[求助]看看 我写的这个程序哪里出错了?
#include "stdio.h"
#include "iotream.h"
void main()
{
FILE*fp;
fp=fopen("txet.txt","w";)
if (fp==NULL)
{cout<<"open error";}
fputc ('a',fp);
fputc ('d',fp);
fputc ('bcef',fp);
fclose(fp);}
FILE*fp;
char a[20];
fp=fopen("txet.txt","r");
if (fp==NULL)
{cout<<"open error"};
fscanf (fp,"%s",a);
fclose(fp);
cout<<a<<endl;