I've been having trouble with this section of code:
It gives me an error. The only way I can get it to work is if I make functionname static.Code:class classname {
public:
void functionname(void *exampledata) {}
};
class class2 : public classname {
public:
void callfunctionpointer(void (*funcname)(void *)) {
funcname(NULL);
}
void testfunctionpointer() {
callfunctionpointer(functionname);
}
};
Anyone know how to help?