运行后 出现这个 提示 invalid lvalue in assignment 不知道哪里出错了
#include<stdio.h>#include<stdlib.h>
int main()
{
FILE *fsource,*fdest;
char sourcename[80],destname[80];
char ch;
printf("输入源程序文件名:");
scanf("%s",sourcename);
printf("输入目的文件名:");
scanf("%s",destname);
if((fsource=fopen(sourcename,"r"))=NULL)
{
printf("打开文件%s失败",sourcename);
system("pause");
exit(1);
}
if((fdest=fopen(destname[],"w"))=NULL)
{
printf("打开文件%s失败",destname);
system("pause");
exit(2);
}
ch=fgetc(fsource);
while(!feof(fsource))
{
fputc(ch,fdest);
ch=getc(fsource);
}
fclose(fsource);
fclose(fdest);
system("pause");
return 0;
}