在执行下面这段程序时,为什么弹出下面的对话框呢?该怎么解决?(vc++6.0)
#include<stdio.h>#include<stdlib.h>intmain(){FILE*fp1,*fp2;chara[18];fp1=fopen("czxfi...
#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE *fp1,*fp2;
char a[18];
fp1=fopen("czxfile1.txt","r");
fp2=fopen("czxfile2.txt","w");
printf("%s",fgets(a,15,fp1));
rewind(fp1);
fputs(fgets(a,15,fp1),fp2);
fclose(fp1);
fclose(fp2);
return 0;
} 展开
#include <stdlib.h>
int main()
{
FILE *fp1,*fp2;
char a[18];
fp1=fopen("czxfile1.txt","r");
fp2=fopen("czxfile2.txt","w");
printf("%s",fgets(a,15,fp1));
rewind(fp1);
fputs(fgets(a,15,fp1),fp2);
fclose(fp1);
fclose(fp2);
return 0;
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询