摘要:
1 #include <iostream> 2 3 using namespace std; 4 5 class ComputeBase 6 { 7 public: 8 //virtual 拼写出错 9 //没写成纯虚函数,没有写实现,会出现链接错误 10 virtual double operation(double pre, double next) = 0; 11 }; 12 13 class Add: public ComputeBase 14 { 15 public: 16 virtual double operation(double pr... 阅读全文