I am attempting to wrap my brain around function pointers. I created two files, exeCallback.h and exeCallback.cpp. I am receiving the error: "expression must have (pointer-to-) function type". The error resides at: After reading that error, I edited the line that was giving me the error to
throws two new errors that are, expected an identifier and expected a type specifier. What am I not doing to get my basic callback library to work successfully?
exeCallback.cpp file code:
Header file for exeCommand Library.
void my_int_func(int x);
Execute functions in other Sensor libraries/classes
foo = &exeCallback::my_int_func;
void exeCallback::my_int_func(int x)
printf( "%d\n", x );