摘要: 1 #include <iostream> 2 using namespace std; 3 4 int main() 5 { 6 int rats=101; 7 int &rodents=rats; //&为引用 8 cout<<"rats="<<rats; 9 cout<<",rodents"< 阅读全文
posted @ 2018-07-30 16:00 小雨滴答 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 内联函数和常规函数一样,是按值来传递参数的,如果参数为表达式,则函数将传递表达式的值 宏不能按值传递,而是通过文本替换来实现的 阅读全文
posted @ 2018-07-30 14:41 小雨滴答 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 1 void CMyProjetDlg::OnPaint() 2 { 3 4 CPaintDC dc(this);//用于绘制设备的上下文 5 CRect rect; 6 GetClientRect(&rect); //获取对话框长宽 7 CDC dcBmp; //定义并创建一个内存设备环境 8 dcBm... 阅读全文
posted @ 2018-07-30 09:23 小雨滴答 阅读(129) 评论(0) 推荐(0) 编辑