What is the meaning of this declaration? (was given during an interview) :
typedef void * (A:: *B)(char *);
What is the meaning of this declaration? (was given during an interview) :
typedef void * (A:: *B)(char *);
Define B
as a pointer to member-function of class A
, which receives char*
and returns void*
.
Declare B
as the type of signature of member functions of class A
getting a char*
argument and returning a void*
pointer.
I don't feel it is obfuscated. It permits much more readable code. See this answer (for C, but you could adapt it for C++).