c++ callback for events

Newbie Member
30Dec2011,16:07   #1
amanpoonia's Avatar
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
Go4Expert Founder
30Dec2011,18:35   #2
shabbir's Avatar
Moved to C++ forum
Mentor
31Dec2011,04:30   #3
xpi0t0s's Avatar
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.