I have a problem with using a pointer to function in C++. Here is my example:
#include using namespace std; class bar { public: void (
To make your second option work, declare foo so the compiler knows that it is a class.
Also note that your function pointer syntax is incorrect. The * comes just before the name of the variable:
*
class foo; class bar { public: void (foo::*funcP)(); };