⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rect.cpp

📁 高等教育出版社出版的C++程序设计同步实验范例 希望对用这本教材得同学有点帮助
💻 CPP
字号:
#include <iostream.h>
#include <rect.h>
// 构造函数,带缺省参数,缺省值为全0
Rectangle::Rectangle(int l, int t, int r, int b) {
	left = l; top = t;
	right = r; bottom = b; 
}
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';
}
//void Rectangle::Draw(CDC * pDC){ 
//pDC->Rectangle(left, top, right, bottom ); 
//}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -