When "function pointer" meets "template"... I can't get rid of this compiling er
First, just to let you know that I use g++ to compile the src containing following code segments. Now lets start the business.
This is a templated class method I got:
and this is the function pointed by the function pointer:
for(num = 0; num < 5; num++)
cout << "***thread " << tmpThread->GetId() << " looped " << num << " times" << endl;
I have "bathList" as a pointer to SynchList<Thread *>:
SynchList<Thread *> *bathList = new SyncList<Thread *>;
and this is how I implement it (@ line 494 of the src):
bathList->Apply((void) (SimpleThread)(Thread *));
but I get this error msg everytime I try to compile the code:
../threads/thread.cc:494: parse error before '*'
Any help would be greatly appreciated.
Thank you all,