第3题
来源:互联网 发布:centos 配置smtp 编辑:程序博客网 时间:2024/05/22 08:18
#include <iostream>using namespace std;class Point{public: Point(float a,float b):x(a),y(b){} ~Point(){cout<<"executing Point destructor"<<endl;} private: float x; float y;};class Circle:public Point{public:Circle(int a,int b,int r):Point(a,b),radius(r){} ~Circle(){cout<<"executing Circle destructor"<<endl;} private: float radius;};int main(){Point *p=new Circle(2.5,1.8,4.5); Circle *pt=new Circle(2.5,1.8,4.5); delete pt; return 0;}
0 0
- 第3章 第3题
- 第2章第3题
- 第2章 第3题
- 第3章 第4题
- 第3章 第5题
- 第3章 第7题
- 第3章 第8题
- 第3章 第9题
- 第3章 第10题
- 第3章 第11题
- 第3章 第12题
- 第4章 第3题
- 第5章 第3题
- 第5章第3题
- 第3章第37题
- 第7章第3题
- 第7章 第3题
- 第10章第3题
- quick-cocos2d-x如何在mac下编译安卓版本
- 第七章
- 使用Unversial-image-loader来异步加载网络图片和本地图片(二)完结篇
- 点击按钮切换图片
- 关于mexfuntion超级好的输入输出总结
- 第3题
- vs2010中添加qt的对话框
- STL学习笔记之迭代器--iterator(源码剖析)
- ASM(一) 利用Core API 解析和生成字节码
- Merge Two Sorted Lists
- android分辨率
- 【Treap】[BZOJ 1208]宠物收养所
- Yii学习笔记之二(使用gii生成一个简单的例子)
- Android项目页面跳转小Demo