摘要: Primer C++ 练习题4.20:int i = -1;const int ic = i;对于这个,一开始认为,ic 作为const 类型变量,定义时应该给其赋常值,而此处给的是变量i,因此编译时会报错,但是经过验证,这个理解是错误的。为此总结const的一些点:1)const型变量在定义时必须... 阅读全文
posted @ 2016-01-10 22:08 软跋涉者 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 关于errno有以下需要注意:1 A common mistake is to do if (somecall() == -1) { printf("somecall() failed\n"); if (errno == ...) { ... } } where errno no longer... 阅读全文
posted @ 2015-12-06 16:50 软跋涉者 阅读(267) 评论(0) 推荐(0) 编辑
摘要: Even relatively new C programmers have no trouble reading simple C declarations such asint foo[5]; // foo is an array of 5 intschar *foo; ... 阅读全文
posted @ 2015-03-16 09:49 软跋涉者 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 将所有命令行参数回送到标准输出 阅读全文
posted @ 2015-02-10 12:02 软跋涉者 阅读(292) 评论(0) 推荐(0) 编辑