回复 楼主 echo000
好的好的
麻烦您了
#include <stdio.h>
#include <stdlib.h>
int main()
{
char ch[3],kongge;
FILE *fp;
FILE *fb;
if(!(fp=fopen("test.txt","r+")))
{
printf("cant open the test.txt");
system("pause");
return 0;
}
if(!(fb=fopen("testtest.txt","a"))){
printf("cant open the testtest.txt");
system("pause");
}
kongge=' ';
fgets(ch,2,fp);
while(!feof(fp)){
fputs(ch,fb);
fgets(ch,2,fp);
putc(kongge,fb);
}
fclose(fp);
fclose(fb);
system("pause");
return 0;