Am trying to understand usage of typedef with function pointers, if it at all possible that is?
I am getting the following error for the code below:
1 2 3 4 5 6 7 8
func_ptr3.cpp:10:16: error: expected unqualified-id before ‘)’ token
typedefvoid (*)(individual_app *) void_f1_ptr;
^
func_ptr3.cpp:10:36: error: expected initializer before ‘void_f1_ptr’
typedefvoid (*)(individual_app *) void_f1_ptr;
^
func_ptr3.cpp:13:1: error: ‘void_f1_ptr’ does not name a type
void_f1_ptr f_ptr = f1;
can anybody suggest if such a typedef is possible? Appreciate that "auto" is more applicable, but I'd like to know if typedef can be used for such a scenario.