文件名称:p219__3__2
介绍说明--下载内容来自于网络,使用问题请自行百度
#include<iostream>
using namespace std
class Point
{public:
Point(int a){x=a }
~Point(){cout< \"execuing Point destructor\"<<endl }
private:
int x
}
class Circle:public Point
{public:
Circle(int m,int n):Point(m){radius=m }
~Circle(){cout<<\"execuing Circle destructor\"<<radius<<endl }
private:
int radius
}
int main()
{Point *p=new Circle(5,12)
delete p
system(\"pause\")
return 0
}
using namespace std
class Point
{public:
Point(int a){x=a }
~Point(){cout< \"execuing Point destructor\"<<endl }
private:
int x
}
class Circle:public Point
{public:
Circle(int m,int n):Point(m){radius=m }
~Circle(){cout<<\"execuing Circle destructor\"<<radius<<endl }
private:
int radius
}
int main()
{Point *p=new Circle(5,12)
delete p
system(\"pause\")
return 0
}
(系统自动生成,下载前可以参看下载内容)
下载文件列表
p219__3__2.cpp
新建 文本文档.txt
p219__3_3.cpp
p149_3.zip.cpp
www.dssz.com.txt
新建 文本文档.txt
p219__3_3.cpp
p149_3.zip.cpp
www.dssz.com.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.