Can't open infile!
对文件很无语,一点都不懂。不知道哪出了问题,哪位帮看看哦,谢谢#include <stdio.h>
main()
{
FILE *in,*out;
char infile[20],outfile[20];
printf("Enter file_path like :d:\\d\\....");
printf("\nEnter infile_name :");
scanf("%s",infile);
printf("Enter outfile_name :");
scanf("%s",outfile);
if((in=fopen(infile,"r"))==NULL)
{printf("Can't open infile!");
exit(0);
}
if((out=fopen(outfile,"w"))==NULL)
{printf("Can't open outfile!");
exit(0);
}
while(!feof(in))
{fputc(fgetc(in),out);
printf("%c",fgetc(in));
}
fclose(in);
fclose(out);
}