摘要:
#include <iostream>using namespace std;class Road{public: Road(){} virtual ~Road(){} void operation() { start(); step1(); step2(); step3(); end(); } void start(){cout<<"start"<<endl;} void end(){cout<<"end"<<endl;} virtual void step1()=0; ... 阅读全文
摘要:
#include <iostream>#include <string>using namespace std;class math{public: math(){} virtual ~math(){} virtual void add()=0;};class ADD1 : public math{public: ADD1(){} virtual ~ADD1(){} void add() { cout<<"the first type of add"<<endl; }};class ADD2 : public math{pub 阅读全文