I'm trying to call a pointer to a class method with the compiler spitting out: "term does not evaluate to a function"
This is basically what I'm trying to implement:
class Thing;
typedef long(Thing::*FUNC)(int, void**);
class Thing {
Thing() { /*code & other junk */ }
long someMethod(int n, void **ppv) { /* code */}
void doIt(void {
FUNC f = someMethod; //This is legal..... (I'm actually using an array of pointers in my code....)
/* more code */
f(nSomeInt, &vpSomePointer); //craps out here..... "term does not evaluate to a function"
}
}
this snippet is quite lacking but it shows what i mean. This works fine with a regular static function. Why not with an instance method?
This is basically what I'm trying to implement:
class Thing;
typedef long(Thing::*FUNC)(int, void**);
class Thing {
Thing() { /*code & other junk */ }
long someMethod(int n, void **ppv) { /* code */}
void doIt(void {
FUNC f = someMethod; //This is legal..... (I'm actually using an array of pointers in my code....)
/* more code */
f(nSomeInt, &vpSomePointer); //craps out here..... "term does not evaluate to a function"
}
}
this snippet is quite lacking but it shows what i mean. This works fine with a regular static function. Why not with an instance method?