
Originally Posted by
acppdummy
I don't know.
Then that's a problem.
Code:
class MyObject
{
public:
int SomeFunc(int);
};
typedef int (MyObject::*fn)(int);
int main()
{
fn MyFnPtr = &MyObject::SomeFunc;
MyObject object; // create an instance of MyObject
(object.*MyFnPtr)(10);
}
Look at the line in red. You see that the object instance must be part of the syntax to call a non-static member function. If you were thinking it would look like your 'C' function call syntax, you were wrong.
Code:
typedef int (*fn)(int);
int SomeFunc(int);
int main()
{
fn MyFnPtr = &SomeFunc;
(*fn)(10); // C-style function
}
Note the vast difference.
So where is "object" in your multimap design going to come from?
Regards,
Paul McKenzie