厚德载物peng.blog.chinaunix.net
chengxiaopeng
hello world.
全部博文(308)
汇编语言(0)
离散数学(1)
C语言趣味程序百(11)
C++程序设计(30)
串(1)
队列(2)
栈(2)
链式存储结构(1)
线性表(1)
Shell编程(4)
其它(13)
Linux环境下C编程(3)
网络编程(1)
贪心算法(1)
分治法(1)
穷举法(1)
算法练习(1)
妙趣横生的算法(57)
xiongwen
jys715
li117666
lijunlin
km康蒙92
zhaounix
59459763
yaogh
youlan87
分类: C/C++
2010-11-25 15:13:43
#include <iostream>using namespace std;class A{ public: A(){ cout << "construction A" << endl;} ~A(){cout << "destructing A" << endl;}};class B: public A{ public: B(){ cout << "construction B" << endl;} ~B(){cout << "destructing B" << endl;}};class C: public B{ public: C(){ cout << "construction C" << endl;} ~C(){cout << "destructing C" << endl;}};int main(){ C c1; c1.~C(); system("pause"); return 0;}
上一篇:C++程序习题-修改公用继承[5.4]
下一篇:C++程序习题-多重继承[5.9]
登录 注册