摘要: int_range.h #ifndef _INT_RANGE_H_ #define _INT_RANGE_H_ #include "file_reader.h" #include "buffer.h" #include "limits.h" #include "string.h" #ifdef __ 阅读全文
posted @ 2019-12-10 16:11 耶 阅读(131) 评论(0) 推荐(0)
摘要: 文件打开、关闭的统一管理。 打开文件 —— 处理文件 —— 关闭文件。 那么文件访问的结构体里必须包含文件名、处理方法。这次我们多加一个成员 —— 访问模式。于是 file_reader.h #ifndef _FILE_READER_H_ #define _FILE_READER_H_ #inclu 阅读全文
posted @ 2019-12-10 15:45 耶 阅读(155) 评论(0) 推荐(0)
摘要: test.c #include <stdio.h> #include <stdlib.h> #include <string.h> #include <limits.h> int main(int argc, char const *argv[]) { char *buf = NULL; int f 阅读全文
posted @ 2019-12-10 00:10 耶 阅读(153) 评论(0) 推荐(0)