suppose I have a class with a member function pointer declared:
bool (myclass::*secspec_goutmsg)(char* msg , int n) ;
I can declare a method somewhere that simply calls this function pointer and returns the result
bool custom_gui(char* msg , int n)
{
if (secspec_goutmsg !=NULL)
return (*this.*secspec_goutmsg)(msg , n) ;
else
return false ;
}
Is it however possible to call this function pointer directly from outside the class eliminating this method that is essentially a wrapper ? things like
(*myclassinstance.*(myclass::secspec_goutmsg))(msg , n) ;
do not even compile.