首页 > 其他 > 详细

注释的位置应与被描述的代码相邻

时间:2018-08-03 12:14:47      阅读:93      评论:0      收藏:0      [点我收藏+]

注释的位置应与被描述的代码相邻,可以放在代码的上方或右方 ,不 可放在下方。

 

 1 #include <iostream>
 2 #define   PI   3.1416
 3 /* run this program using the console pauser or add your own getch, system("pause") or input loop */
 4 using namespace std;
 5 int main(int argc, char** argv) {
 6         int i=100;
 7 #if 1
 8     cout<<"i="<<i<<endl;
 9 #endif
10 
11 #ifdef PI
12     cout<<"1  PI="<<PI<<endl;
13 #endif
14 
15 #ifndef PI
16     cout<<"2  PI="<<PI<<endl;   //此语句不被编译执行
17 #endif
18     return 0;
19 }

 

注释的位置应与被描述的代码相邻

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

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