文章分类 -  面试常见题目

摘要:运行下面的C++代码,打印的结果是什么?View Code class Base{public: void print() { doPrint();} private: virtual void doPrint() {cout << "Base::doPrint" << endl;}}; class Derived : public Base{private: virtual void doPrint() {cout << "Derived::doPrint" << endl;}}; int _tmain( 阅读全文
posted @ 2012-02-05 14:13 linyliny 阅读(130) 评论(0) 推荐(0)