#include
using namespace std;
class Rectangle {
public:
Rectangle(int x,int y);
int area();
private:
int width;int length;
};
int Rectangle::area() {
return width*length;
}
int main() {
int width;
int length;
cout<<"enter the width and length of the rectangle:"<
cin>>width>>length;
Rectangle A(width,length);
cout<<"the area of rectangle a is"<<A.area()<<endl;
return 0;
}
[Error] ld returned 1 exit status在Dev的运行的程序是错了什么啊?
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-