Kinda urological for my right now why this isn`t working.
Code:#include <iostream> using namespace std; void myFunction(void *CallThis, int a); void myCallback(); int main(); void myFunction(void *CallThis, int a) { cout << __FUNCDNAME__ << endl; cout << CallThis << endl; CallThis(); //compile error: error C2064: term does not evaluate to a function taking 0 arguments } void myCallback() { cout << __FUNCDNAME__ << endl; } int main() { void (*ptr)(); ptr = myCallback; ptr(); //working myFunction(ptr, 2); return EXIT_SUCCESS; }



LinkBack URL
About LinkBacks



