#include <stdio.h>
指针定义:FILE *fp;
打开文件:fp = fopen(“file path”, “W+”);
文件操作:fprintf(fp, “value:%d”, val);
文件关闭:fclose(fp);
如文件写入:
FILE *fp = fopen(“hello.c”, “w+”);
fprintf(fp, “where is my god?\nI am where you can’t find watching you!”);
fclose(fp);