hello
Is there a known way to assign a class method to a function pointer?
I tried this, which doesn't work:
compiler (g++) says:Code:class MyClass { void func () { ... } } int main () { void (*fptr) (); //function pointer MyClass foo; //instance fptr = foo.func; }
error: argument of type ‘void (Class:: )()’ does not match ‘void (*)()’