Function pointers

Started by
21 comments, last by Graham 20 years, 6 months ago
I am somewhat new to c++ and just found a solution for this that in my own project might help you. I don''t know if it is the right way but it works for me.

After going through the all the stuff to declare and set a member function pointer, create a member public inline function that wraps the (this->*MemberFunctionPointerName)() call. That way you have simplified the syntax of function pointers, allowed external access without adding additional overhead.

Lee Moore
Advertisement
Graham, I think it should work like you did it in your "Test" application here.

Though I think I did it once but when I passed the adress to the function I did it like this:

&CSomeClass::SomeFunction;
(varA.*(varB.func))(); worked fine, thanks for all the help.
Go on an Intense Rampage

This topic is closed to new replies.

Advertisement