摘要: Item 07 : 为多态基类声明virtual析构函数 1 #include 2 using namespace std; 3 4 class Base { 5 public: 6 Base() : bValue(1) {} 7 virtual ~Base() { cout p... 阅读全文
posted @ 2015-06-27 14:34 Ryan in C++ 阅读(210) 评论(0) 推荐(0) 编辑
摘要: code: 1 // Original file by Jay Chan: 2 // https://gist.github.com/justecorruptio/9967738 3 4 #include 5 #include 6 #include 7 #include 8... 阅读全文
posted @ 2015-06-27 13:47 Ryan in C++ 阅读(494) 评论(0) 推荐(0) 编辑