在wintc中怎么样插入在以下程序中“文件复制成功”文件复制失败“然后输入的提示语
实现文件复制的程序如下,在wintc环境运行怎么样在程序中插入“文件复制成功”“文件复制失败“然后在界面中输入的提示语,请各位大哥大姐帮助我 谢谢#include "stdio.h"main( )
{
FILE *in,*out;
char ch,infile[10],outfile[10];
printf("Input the infile name:\n");
scanf("%s",infile);
printf("Input the outfile name:\n");
scanf("%s",outfile);
if((in=fopen(infile,"r"))==NULL)
{
printf("Can't open infile\n"); exit(0);
}
if((out=fopen(outfile,"w"))==NULL)
{
printf("Can't open outfile\n"); exit(0);
}
while(!feof(in)) fputc(fgetc(in),out); /* while((ch=fgetc(in))!=EOF) fputc(ch,out); */
fclose(in);
fclose(out);
}