
C/C++
一望损莓苔
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
warning: this decimal constant is unsigned only in ISO C90
关于c语言中的大整数常量--by流氓兔斯基之前编译程序的时候发现了这个问题:warning: this decimal constant is unsigned only in ISO C90 找了一下解决方式,记录一下: 1 在常数后面增加一个UL标识,或者ULL表示,如4294967295UL,这样就不会报警了 2 使用十六进制的数字,如0xFFFFFFFF 3 使用gcc -st转载 2016-12-21 16:29:52 · 341 阅读 · 0 评论 -
atoi()函数使用注意事项
atoi (表示 alphanumeric to integer)是把字符串转换成整型数的一个函数 int atoi(const char *nptr); 参数nptr字符串,如果第一个非空格字符存在,是数字或者正负号则开始做类型转换,之后检测到非数字(包括结束符 \0) 字符时停止转换,返回整型数。否则,返回零。包含在头文件stdlib.h中 注意:atoi要检测到非数原创 2016-10-13 09:37:32 · 5252 阅读 · 0 评论 -
C语言错误:expected declaration or statement at end of input
可能错误: 1. 某一个函数或者变量没有在使用之前声明。 2. 某个地方少了个括号。转载 2017-01-16 19:10:37 · 2080 阅读 · 0 评论 -
error: macro names must be identifiers
转载地址:http://blog.youkuaiyun.com/cs_zlg/article/details/8258861 问题: 工程中有一个头文件以数字为开头命名,编译结果显示预处理时出错,显示信息为error: macro names must be identifiers。 中文大意应该“宏名称必须是标识符”。 解决方案: 将头文件重命名为字母开头,erro转载 2017-05-10 18:16:46 · 449 阅读 · 0 评论 -
a label can only be part of a statement and a declaration is not a statement
http://www.cnblogs.com/vanishfan/archive/2012/11/06/2756374.html GCC: error: a label can only be part of a statement and a declaration is not a statement switch(a){ swtch(a){转载 2017-09-05 17:14:41 · 293 阅读 · 0 评论