2014年7月14日
摘要: 1、switch语句: 编译错误case label does not reduce to an integer constant在case中肯定不能进行条件判断.用嵌套的ifelse就解决了switch语句的格式为switch(表达式){case常量表达式1:语句1case常量表达式2:语句2^^... 阅读全文
posted @ 2014-07-14 17:05 flying06 阅读(16439) 评论(0) 推荐(0) 编辑
摘要: open 函数用于打开和创建文件。以下是 open 函数的简单描述 #include int open(const char *pathname, int oflag, ... ); 返回值:成功则返回文件描述符,否则返回 -1对于 open 函数来说,第三个参数(...)仅当创建新文件时才使用,... 阅读全文
posted @ 2014-07-14 17:01 flying06 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 这个问题,对于初学者,是个相当经典的问题。今天自己的也出现了,源程序如下:test.c#includeint main(){ char a[10]; strcpy( a, "abc" ); return 0;}使用gcc编译,出现提示:[hwxc@localhost other]$... 阅读全文
posted @ 2014-07-14 15:39 flying06 阅读(1818) 评论(0) 推荐(0) 编辑