fig5_8.cpp.bak
来自「用三个类来研究类的继承!类Point、Circle、Cylinder」· BAK 代码 · 共 27 行
BAK
27 行
//fig5_8.cpp
//类Circle的测试程序
#include <iostream.h>
#include <assert.h>
#include "circle2.h"
main()
{
Circle c(2.5, 3.7, 4.3);
cout<<"X coodinate is "<<c.getX()
<<"\nY coodinate is "<<c.getY()
<<"\nRadius is "<<c.getRadius();
c.setRadius(4.25);
c.setPoint(2, 2);
cout<<"\n\nThe new location and radius of c are \n"
<<c<<"\narea:"<<c.area()<<endl;
Point *pRef=c;
cout<<"\nCircle print as a point is: "
<<pRef<<endl;
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?