Unfamiliar typedef

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.
Ah, yes. Typedefs using type casts are fun.
http://en.wikipedia.org/wiki/Typedef#Using_typedef_with_type_casts

-Albatross
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
Topic archived. No new replies allowed.