先来看看这个:
#include<stdio.h>
#include<string.h>
int main()
{
FILE *fp;
char readBuf[128]={
0};
char *buf="nice move!";
fp=fopen("./qin.txt","w+");
int n_write=fwrite(buf,sizeof(char),strlen(buf),fp);
fseek(fp,0,SEEK_SET);
int n_read=fread(readBuf,sizeof(char),strlen(buf),fp)