Thanks Sicarie for replying....
Silly me I made a mistake in the above example. The member_function is actually public in scope.... I just need to have a generic function pointer, that knows nothing of classes, to point to a class member function of the same signature....
User Profile
Collapse
-
Pointing to non-static member functions
Hi All,
The code that I am trying to write requires that a function pointer be made to point to a non-static member function of a class object. More specifically,
class ExampleClass{
private:
double member_function (int);
}
function pointer declaration somewhere else;
double (*func_pointer) (int)
What I want to do
func_pointer = member_function ;...
No activity results to display
Show More
Leave a comment: