Original Post
Ok. This is driving me nuts. I want to create an array of class member
function pointers and then invoke the call in each one.
Here's what I got:
The above code seems to compile ok.
And I'm trying to invoke the call with:
for(i=0; i < 16; i++) {
(*function_ptrs [ i ] )();
}
But, this line gives me a compilation error:
error C2064: term does not evaluate to a function
Any thoughts? I'm going to try it again tomorrow.
Wayfarer
Edited by - Wayfarer on 7/3/00 12:50:28 AM
class Test {
protected:
public:
Test(void);
~Test(void);
typedef void (Test::*function_ptr)();
function_ptr function_ptrs[16];
void Call_Me1();
void Call_Me2();
void Call_Me3();
// etc..
};
Test::Test(void) {
function_ptrs[0] = Call_Me1;
function_ptrs[1] = Call_Me2;
function_ptrs[2] = Call_Me3;
// etc..
}
|