摘要:
有如下继承关系的几个类:以下是类的相关代码://抽象基类:动物类class CAnimal{public: virtual void EatFood(string strSomething) = 0; virtual void Drink(string strSomething) = 0;};//CAnimal的派生类:CMammalclass CMammal : public CAnimal{public: virtual void EatFood(string strSomething) { cout << "CMammal::EatFood()" ... 阅读全文