首页 > 其他 > 详细

尽量避免在注释中使用缩写

时间:2018-08-03 12:46:32      阅读:142      评论:0      收藏:0      [点我收藏+]

尽量避免在注释中使用缩写,特别是不常用缩写。

 

 1 #include <iostream>
 2 #define  PRINT(k)   cout<<(k)<<endl;
 3 #define  MAX(a,b)   ((a)>(b) ? (a):(b))
 4 /* run this program using the console pauser or add your own getch, system("pause") or input loop */
 5 using namespace std;
 6 int main(int argc, char** argv) {
 7     int i=3,j=2;
 8 
 9     //MAX(a,b)宏替换的使用 
10     cout<<"MAX(10,12)="<<MAX(10,12)<<endl;
11     cout<<"MAX(i,j)="<<MAX(i,j)<<endl;
12     cout<<"MAX(2*i,j+3)="<<MAX(2*i,j+3)<<endl;
13 
14     //PRINT(k)宏替换的使用
15     PRINT(5);
16     PRINT(MAX(7,i*j));   
17 
18     return 0;
19 }

 

尽量避免在注释中使用缩写

原文:https://www.cnblogs.com/borter/p/9413367.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!