文件名称:dv
介绍说明--下载内容均来自于网络,请自行研究使用
#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
}
(系统自动生成,下载前可以参看下载内容)
下载文件列表
压缩包 : 57578840dv.rar 列表 p219__3_3.cpp p219_1.cpp p149_3.zip.cpp