Hi guys
Is there a way to make a function pointer to point to different function?? For example:
Is there a way to make a function pointer that can point to both?
Thanks guys!
Is there a way to make a function pointer to point to different function?? For example:
Code:
// function pointer to a function with no return and no parameter
typedef void (* func_1) (void);
// function pointer to a function with int return, and int parameter
type int (*func_2)(int);
Code:
// some kind of function pointer that can point to both
typedef [NULL??] (*func_all)(NULL??);
func_all func_void;
func_all func_int;
func_void = func_1;
func_int = func_2;
