文件名称: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
}
(系统自动生成,下载前可以参看下载内容)
下载文件列表
压缩包 : 49636931p219__3__2.rar 列表 p219__3__2.cpp 新建 文本文档.txt p219__3_3.cpp p149_3.zip.cpp