摘要: 有如下继承关系的几个类:以下是类的相关代码://抽象基类:动物类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()" ... 阅读全文
posted @ 2012-03-15 12:47 kcy-666 阅读(2878) 评论(0) 推荐(1) 编辑