导读 #include int main(){ FILE * fp; int a=45; int b; fp=fopen("1.txt","wb+"); fwrite(&a,sizeof(int),1,fp);///将a值写到文件...
#include
fseek(fp,0,0);//将文件指针移回首部 fread(&b,sizeof(int),1,fp); printf("b is %d",b); fclose(fp); return 0;}。