8_7.cpp
来自「c++书籍的源代码」· C++ 代码 · 共 62 行
CPP
62 行
//8_7.cpp
#include<iostream.h>
#include"Xcircle.h"
#include"8_7.h"
Shape::Shape(void)
{
cout<<"Shape类的构造函数被调用"<<endl;
}
Shape::~Shape()
{
cout<<"Shape类的析构函数被调用"<<endl;
}
Point::Point(void)
{
cout<<"Point类的构造函数被调用"<<endl;
}
Point::~Point()
{
cout<<"Point类的析构函数被调用"<<endl;
}
void Point::Draw(void)
{
cout<<"绘制了一个点"<<endl;
}
Line::Line(void)
{
cout<<"Line类的构造函数被调用"<<endl;
}
Line::~Line()
{
cout<<"Line类的析构函数被调用"<<endl;
}
void Line::Draw(void)
{
cout<<"绘制了一条直线"<<endl;
}
Square::Square(void)
{
cout<<"Square类的构造函数被调用"<<endl;
}
Square::~Square()
{
cout<<"Square类的析构函数被调用"<<endl;
}
void Square::Draw(void)
{
cout<<"绘制了一个正方形"<<endl;
}
Circle::Circle(void)
{
cout<<"Circle类的构造函数被调用"<<endl;
}
Circle::~Circle()
{
cout<<"Circle类的析构函数被调用"<<endl;
}
void Circle::Draw(void)
{
m_circle.Draw_cir();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?