
第3关:计算图像面积
#include
using namespace std;
/********* Begin *********/
class Shape
{
public:
virtual void PrintArea()=0;//基类的声明
};
class Rectangle : public Shape
{
public:
float width;
float height;
void PrintArea()
{
cout<<"矩形面积 = "<
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)