📄 rect.cpp
字号:
#include <iostream>
#include "rect.h"
using namespace std;
Rectangle::Rectangle(int l , int t, int r, int b) {
left = l; top = t;
right = r; bottom = b;
} // 构造函数,带默认参数,缺省值为全0,在声明中指定
void Rectangle::Assign(int l, int t, int r, int b){
left = l; top = t;
right = r; bottom = b;
}
void Rectangle::Show(){
cout<<"left-top point is ("<<left<<","<<top<<")"<<'\n';
cout<<"right-bottom point is ("<<right<<","<<bottom<<")"<<'\n';
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -