class rectangle
{
public:
rectangle() : m_width(0),m_height(0){}//默认构造函数
rectangle(int width, int height)
: m_width(width),m_height(height){} //构造函数带宽高
int getWidth() const {return m_width;} //取得宽度
int getHeight() const {return m_height;} //取得高度
int getArea() const {return m_width*m_height;} //取得面积
protected:
int m_width;
int m_height;
}