![]() |
access 'typedef'ed member function
Hi folks,
I am learning member function pointers, wrote following program to understand typedef of function (of other class eg: test) inside other class(eg: exam) and then its access.:smug: I have tried to use (e.*m)(8) but its gave err:‘m’ was not declared in this scope Could you please tell me how to call function 'add' using e.m I have added comments inline for reference Code:
|
Re: access 'typedef'ed member function
U need to mention he class name of which the add() function is the member...
Modify line (e.m)(8); To t .*(e.m) (8) |
Re: access 'typedef'ed member function
Please consider this on
U need to mention he class name of which the add() function is the member... Modify line (e.m)(8); To (t .*(e.m)) (8) |
Re: access 'typedef'ed member function
thank you debugEnthu, its working :)
|
| All times are GMT +5.5. The time now is 09:48. |