回复 5楼 Jeyyion_han
int main()
{
char s[1024] = { 0 };
FILE *p = fopen("F:\\temp\\a.text", "r"); //打开读的文件
FILE *p1 = fopen("F:\\temp\\b.text", "w"); //打开写的文件
while (!feof(p))//不到文件结尾就循环
{
memset(s, 0, sizeof(s));
fgets(s, sizeof(s), p);
fputs(s, p1);
}
printf("end\n");
fclose(p);
fclose(p1);
return 0;
}
为啥总报错呢