I'm working with a program that contains the following statements:
#ifdef __cplusplus
typedef int (*FUNCPTR)(...);
#else
typedef int (*FUNCPTR)(void*);
#endif
What do these typedefs do? Later in the program there are function prototypes of the form:
int halt (FUNCPTR pFunc);
What does the prototype look like after the compiler applies the applicable typedef?
Thanks.
It would look like this:
int halt(int(*pFunc)(...));
or
int halt(int(*pFunc)(void*));
it means FUNCPTR is a function pointer which points to a function like this: int fun(...)
Last edited on