qq_36995515
PonyHA
2016-12-10 11:03
采纳率: 66.7%
浏览 1.8k

[Error] ld returned 1 exit status在Dev的运行的程序是错了什么啊?

#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;
}

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • qq_34580130
    Max_One 2016-12-10 11:07
    已采纳

    Rectangle(int x,int y)构造函数没实现

    点赞 评论

相关推荐