![]() |
is it possible to return a function pointer which is a member of a class
elaborating more;-
the Fptr which is returned from the function points to a function which is a member function of a class Code:
//compiled using devcpp (GCC compiler) |
Re: is it possible to return a function pointer which is a member of a class
Did you have a question?
|
Re: is it possible to return a function pointer which is a member of a class
the Question is
want to know how to return address of a member function of a class (tAdd and tSubtract in this case) ? |
Re: is it possible to return a function pointer which is a member of a class
Oh, I see that the question was in the title. Sorry.
You can do this most easily by declaring tAdd and tSubtract as "static" then they have no implicit "this" pointer and will conform to your prototype. |
| All times are GMT +5.5. The time now is 01:33. |