摘要: 虚函数代码如下定义:// test1107.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include using namespace std;class father{public: int f_age; std::string f_name; father(int a = 1,std::string n = ""):f_age(a),f_name(n){} virtual int get_age(){return f_age;} };class son : public father{publ 阅读全文
posted @ 2013-11-13 21:39 xingoo 阅读(353) 评论(0) 推荐(0)
摘要: 1 阅读全文
posted @ 2013-11-13 21:06 xingoo 阅读(222) 评论(0) 推荐(0)