文件复制不知错哪
#include"stdio.h"#include"stdlib.h"
void main()
{
FILE *i,*o;
char ch;
if ((i=fopen("D:\w","r"))==NULL)
{
printf("error!\n");exit(0);
}
if ((o=fopen("D:\q","a"))==NULL)
{
printf("error!!!!!\n");exit(0);
}
while(!feof(i))
if ((ch=fgetc(i))!=EOF) fputc(ch,o);
fclose(i);fclose(o);
}说明:在D盘已经建立记事本文件w和q,其中w里写着wo shi zhu!!!
在线等指导,谢谢了先