Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   c++ callback for events (http://www.go4expert.com/forums/cpp-callback-events-t27494/)

amanpoonia 30Dec2011 16:07

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

shabbir 30Dec2011 18:35

Re: c++ callback for events
Moved to C++ forum

xpi0t0s 31Dec2011 04:30

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 06:13.