2013年5月18日

C++中的名字隐藏之<C++编程思想>

摘要: <C++编程思想>第14.5小节中提到了名字隐藏,感觉挺有意思,在这里以自己的语言叙述如下。假如有如下的基类Base,具体定义如下: 1 class Base { 2 public: 3 4 int f() const { 5 std::cout << "Base::f()" << std::endl; 6 } 7 8 int f(const std::string& str) { 9 std::cout << "Base::f(string) " << str << s.. 阅读全文

posted @ 2013-05-18 15:20 Persistence 阅读(313) 评论(0) 推荐(0)

导航