#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main()
{
// int
char str[40],ch;
FILE*fp,*fp1,*fp2;
fp=fopen("ide_input","w");
fp1=fopen("error_log","w");
fp2=fopen("lex_output","w");
if(fp==NULL || fp1==NULL)
{
strcpy(str,"file cannot be found");
fputc(str,fp1);
}
while(1)
{
ch=fgetc(fp);
if(ch==EOF)
break;
else
{
if(ch!='/0')
fputc(ch,fp2);
}
}
fclose(fp);
fclose(fp1);
system("pause");
return 0;
}
This code is giving me an error of "build error .. error 1". May I know why? I am on Windows XP working on dev cpp?