Effective C++ Item07
来源:互联网 发布:淘宝顾客要发票怎么办 编辑:程序博客网 时间:2024/05/22 02:19
class B {public:B() : str("default constructor") { }B(string in_str) : str(in_str) { }~B() { std::cout << "call B's destructor" << std::endl; }private:string str;};class D : public B{public:D(string in_str) : B(in_str), val(32) { }~D() { std::cout << "call D's destructor" << std::endl; }int GetVal() { return val; }private:int val;};int _tmain(int argc, _TCHAR* argv[]){D *pD = new D("test Item 7");B *pB;pB = pD;delete pB;std::cout << pD->GetVal() << std::endl;return 0;}
- Effective C++ Item07
- Effective C++ Item07 Note
- 《Effective C++》和《More Effective C++》汇总
- 《Effective C++》读书笔记
- 《Effective C#》 翻译札记
- 《Effective C++》读感
- 《Effective C++》读后感
- 读《Effective C++》所想
- 《Effective C++》读书笔记
- 《Effective C#》 翻译札记
- 细读《Effective C++》之一
- 《Effective C#》 翻译札记
- effective c sharp 印象
- 细读《Effective C++》之一
- Begin reading 'Effective c++'
- 《Effective C#》 翻译札记
- 《Effective c++》读书笔记
- 《Effective C++》 笔记
- Oracle分区表详解
- C++总是能让我想起什么(4)——C++输入输出流
- Spark应用需求
- 规模超Google+的19家社交网站:FB居首
- 写程序要注意的事情
- Effective C++ Item07
- 《STL源码剖析》-- stl_pair.h
- html学习笔记
- 关于GIS门户(GIS Portal)的概念
- FreeBSD8在企业中的部署应用
- poj 1256 Anagram
- android 双击图片放大,再双击缩小效果 【安卓进化九】
- 疼痛的分类
- java.lang.UnsatisfiedLinkError:/lcims/bea/jdk142_11/jre/lib/i386/libawt.so: libXp.so.6: cannot open