function pointers...
-
I need to store function pointers with same return type and arguments, but from different classes, in a stl map, like this:
void(classA::*)(istringstream&)
andvoid(classB::*)(istringstream&)
in the same map (in another class, classC). is this possible? If so, how is it done? -
I need to store function pointers with same return type and arguments, but from different classes, in a stl map, like this:
void(classA::*)(istringstream&)
andvoid(classB::*)(istringstream&)
in the same map (in another class, classC). is this possible? If so, how is it done?You may find this article http://www.codeproject.com/useritems/polycontainer.asp[^] of help. If you need to call these functions in specific class instances then you will need to hang on to their 'this' pointer or use something like delegates: http://www.codeproject.com/cpp/FastDelegate.asp[^] I can't see why you'd want to store function pointers in a map though! Neville Franks, Author of ED for Windows www.getsoft.com and coming soon: Surfulater www.surfulater.com