第三题(2)
来源:互联网 发布:哪个购票软件安全 编辑:程序博客网 时间:2024/06/06 09:59
#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
- 第三题(2)
- 作业. (第三讲,第三大题,适合2年级)
- 第三周第三题(2) 输出空心三角形
- 第三章第七题(2)
- 课程设计(第三题)
- 第三题(1)
- 第三题(3)
- 第三章第三题
- 第三章第三题
- 第三章第三题
- 第三章课后题2
- apue第三章(2)
- 第三章(2).链栈
- 第三周项目(2)
- 作业. (第三讲,第二大题,适合2年级)
- 第三章:栈与队列算法设计题(2)
- 第三题
- 第三题
- 每个公司、每个社区,都需要不止一个“灵魂人物”。
- Linux kernel 的 sendfile 是如何提高性能的
- Supporting Multiple Screens
- 第三题(1)
- 黑马程序员--集合--4th day
- 第三题(2)
- 第三题(3)
- 【华为oj】质数因子
- Android网络篇
- 一个球从100m高度自由落下……
- ubuntu 平台hadoop2.6.0 按装hive 及注意事项
- 《翻转课堂教学法》实施情况调查结果
- MACOSX10.10 python 安装PIL失败-解决方法
- java—IO流——读取键盘输入的字母并转换成大写字母输出在控制台上