FILE *pf,*f; char word[40]="luchaodong"; char in[40]={0}; pf=fopen("H:\\电子&实践\\代码\\kk.txt","w"); f=fopen("H:\\电子&实践\\代码\\aa.txt","w"); fwrite(word,sizeof(char),10,pf); rewind(pf); fread(in,sizeof(char),11,pf); fwrite(in,sizeof(char),10,f); fclose(pf); free(f); return 0; 可以读入文本,但是读不出来
|