纯新手写的C++程序求大神帮帮忙看看怎么改!!!

2024-12-02 11:43:51
推荐回答(1个)
回答1:

类class最后面没有加分号,定义完Rectangle类后加个分号;
class Rectangle
{
private:
double x1,y1;
double x2,y2;
public:
Rectangle(double a,double b,double c,double d)
{
x1=a;
y1=b;
x2=c;
y2=d;
}
double getwidth(double e);
double getlength(double f);
virtual void diaplay();
void setdata();
};