2012年4月26日
摘要: putchar( ‘a’ ); 阅读全文
posted @ 2012-04-26 17:26 肯定;爱 阅读(184) 评论(0) 推荐(0) 编辑
摘要: What's the value of i++ + i++??It's undefined. Basically, in C and C++, if you read a variable twice in an expression where you also write it, the result is undefined. Don't do that. Another example is:v[i] = i++;Related example:f(v[i], i++);Here, the result is undefined because the orde 阅读全文
posted @ 2012-04-26 17:14 肯定;爱 阅读(157) 评论(0) 推荐(0) 编辑
摘要: FILE * fopen(const char * path,const char * mode);参数mode字符串则代表着流形态。 mode有下列几种形态字符串: r 打开只读文件,该文件必须存在。 r+ 打开可读写的文件,该文件必须存在。 rb+ 读写打开一个二进制文件,只允许读写数据。 rt+ 读写打开一个文本文件,允许读和写。 w 打开只写文件,若文件存在则文件长度清为0,即该文件内容会消失。若文件不存在则建立该文件。 w+ 打开可读写文件,若文件存在则文件长度清为零,即该文件内容会消失。若文件不存在则建立该文件。 a 以附加的方式打开只写文件。若文件不存在,则会建立... 阅读全文
posted @ 2012-04-26 09:42 肯定;爱 阅读(3086) 评论(0) 推荐(0) 编辑