多态之动态绑定的基础——虚函数
摘要:#include <iostream> using namespace std; class base { public: void func(const char* str){cout << "base: " << str << endl;} virtual void func(int num){cout << "base: " << num << endl;} }; class derived : public base { public: void func(con
阅读全文
posted @ 2012-06-19 17:26
浙公网安备 33010602011771号