You may need brackets, which I frogot: (this->*pFoo)(1,2);
Also, you're not calling it with that last syntax posted... It's just a no-op, just like these:
3;
variable; //where variable is a variable of some type
Also, it may be worth using Boost's libraries instead:
void (cTest::*pFoo)(int a, int b);boost::function< void( int , int ) > pFoo;pFoo = foo;pFoo = boost::bind( &cTest::Foo , this );pFoo(1,2); //stays the same when using boost::function
Boost Homepageboost::function is nice in that it's generalized so that it works well with nonmember functions, member functions, and functors.