摘要: 1 多态性#include<iostream>class animal{ public: virtual void breath() { std::cout<<"animal breath"<<std::endl; }};class fish:public animal{ public: void breath() { std::cout<<"fish breath"<<std::endl; }};int main(){ ... 阅读全文
posted @ 2012-07-16 19:53 propheteia 阅读(122) 评论(0) 推荐(0) 编辑