Please Help me to Understand the callback functions using this program.Actually i understand the program. But i want to understand it very clear , what is hear happening. So please.....
class Button
{
public:
class Notifiable
{
public:
virtual void notify()=0;
};
Button (Notifiable *who) : calle (who)
{
}
void click()
{
calle->notify();
}
private:
notifiable *calle;
};
class CDPlayer
{
public:
void play()
{
// actions here ...
}
};
class MyCDPlayer:Public CDPlayer,public Button:Notifiable
{
public:
void notify()
{
play();
}
};
void main()
{
MyCDPlayer SONY;
Button button(&SONY);
button.Click();
}
Please.....