#include <iostream>
#include <string> using namespace std; class Receiver
{
public:
void do_execute()
{
cout << "I am the last receiver" <<endl;
} };
class Command
{
public:
void execute(){m_preceiver->do_execute();}
private:
Receiver *m_preceiver;
}; int main()
{
Command *pcmd = new Command();
pcmd->execute();
return 0;
}
05-11 15:38