Click to See Complete Forum and Search --> : How does VC parse typedef void(*FUNC)();


Lacura
June 26th, 2002, 09:43 PM
typedef allow us to define an alias name for a type.
For simple typedef statment such as
typedef int A;
the implemetation is straight forward-- just subsitute A as int;
but when it comes to more complex form,such as function pointer type,

typedef void (*FUNC)();

defines FUNC as a void (*)() type. How does a compiler implement this?

Graham
June 27th, 2002, 03:24 AM
It's a pointer to a function returning void and taking no arguments (or having an unspecified argument list, if it's C rather than C++).