2016年1月27日

C语言 文件操作7--文件错误处理

摘要: //文件错误处理 #define _CRT_SECURE_NO_WARNINGS #include #include #include //perror(s)函数: 用来将上一个函数发生错误的原因输出到标准设备(stderr)。参数 s 所指的字符串会先打印出,后面再加上错误原因字符串 //feof()函数:检测流上的文件结束符,如果文件结束,则返回非0值,否则返回0,文件结束符只能被c... 阅读全文

posted @ 2016-01-27 17:23 寒魔影 阅读(2052) 评论(0) 推荐(0)

C语言 读取文件中特定数据

摘要: //读取文件数据 #define _CRT_SECURE_NO_WARNINGS #include #include struct jiang{ char one[50]; char two[50]; }str[13]; void main(){ //定义数据 int arr[5] = { 0 }; //定义文件路径 char path... 阅读全文

posted @ 2016-01-27 15:51 寒魔影 阅读(3654) 评论(0) 推荐(0)

C语言 文件操作6--文件打开方式详解

摘要: 文件读写,二进制文件读取的要点 阅读全文

posted @ 2016-01-27 14:30 寒魔影 阅读(14098) 评论(0) 推荐(0)

导航