虚函数与纯虚函数请参考:http://blog.csdn.net/hackbuteer1/article/details/7558868
创新互联主营友谊网站建设的网络公司,主营网站建设方案,App定制开发,友谊h5小程序设计搭建,友谊网站营销推广欢迎友谊等地区企业咨询
#includeusing namespace std; class Animal { public: virtual void eat()=0; virtual void sleep()=0; }; class Cat:public Animal { public: void eat() { cout<<"The cat is eating now."< eat(); p->sleep(); cout<<"========================"<
网页名称:C++抽象类与纯虚函数实战举例
本文网址:http://cxhlcq.com/article/gocihh.html