I'm trying to create a typedef which can create a function pointer to a function which returns void and has no parameters, such as the example delcaration you see below:
void TestFunc(void);
I've tried the following:
typedef void (*_FuncPtr)(void);
So, if I do this:
The compiler returns an error saying that FunctionPtr does not evaluate to a function taking 0 arguments.Code:_FuncPtr FunctionPtr = TestFunc; FunctionPtr();
How would I appropriately create a function pointer such as this?
Thanks!




Reply With Quote