摘要:
第五章 代理类 :为了实现容器或数组的多态性。 1 #include <iostream> 2 3 using namespace std; 4 5 class Vehicle 6 { 7 public: 8 virtual void start() const = 0 ; 9 virtual Vehicle* copy() const = 0 ;10 virtual ~Vehicle() {};11 };12 13 14 class AutoVehicle : public Vehicle 15 {16 public:17 void start() con... 阅读全文