![]() |
c++ callback for events
how can we implement callback..
Suppose we have two classes student and display and we will call display only when the marks of students have changed using function pointers. we can increase number of student .we can add marks for particular student keeping it in while loop |
Re: c++ callback for events
Moved to C++ forum
|
Re: c++ callback for events
One of the aims of OOP is to eliminate the need for unsafe practices like calling function pointers. Do the design properly and you won't need to use function pointers for this - you can just call the display routine on a change, using the display object directly.
|
| All times are GMT +5.5. The time now is 15:02. |