求教一个小小的问题
这个程序为什么有错啊,快帮帮我呀
#include<iostream.h>
class Rectangle
{
public:
Rectangle(int x,int y,int z,int w);
int Area(void);
private:
int x1,x2,y1,y2;
}
Rectangle::Rectangle(int x,int y,int z,int w)
{
x1=x;
x2=z;
y1=y;
y2=w;
}
int Rectangle::Area(void)
{
int s;
s=(x2-x1)*(y2-y1);
return s;
}
void main()
{
Rectangle c(1,1,10,10);
cout<<c.Area()<<endl;
}