写错了根据优先级,==比=大,你忘记加()了,所以才不行.#include<stdio.h>
#include<stdlib.h>
void main()
{
FILE *fp;
char ch;
if( (fp=fopen("fa.dat","r"))==NULL)
{printf("Can't open this file!\\n");exit(0);}
ch=getchar();
while(ch!='@')
{fputc(ch,fp);ch=getchar();}
fclose(fp);
}