?? rectangletype.h
字號:
#ifndef H_rectangleType
#define H_rectangleType
class rectangleType
{
friend rectangleType operator+(const rectangleType& ,
const rectangleType&);
//Overload the operator +
friend rectangleType operator*(const rectangleType& ,
const rectangleType&);
//Overload the operator *
friend bool operator==(const rectangleType& ,
const rectangleType&);
//Overload the operator ==
friend bool operator!=(const rectangleType& ,
const rectangleType&);
//Overload the operator !=
public:
void setDimension(double l, double w);
double getLength() const;
double getWidth() const;
double area() const;
double perimeter() const;
void print() const;
rectangleType();
rectangleType(double l, double w);
private:
double length;
double width;
};
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -