#include"io430.h"
#include"stdio.h"
int main( void )
{
// Stop watchdog timer to prevent time out reset
WDTCTL = WDTPW + WDTHOLD;
FILE *pf;
char str[100];
int i;
for(i=0;i<100;i++) str[i]=0;
pf=fopen("D:\\record.txt","r");
fread(str,100,100,pf);
fclose(pf);
printf("\n%s",str);
return 0;
}
但是编译之后总是提示我三个错误如下:
Error[Pe020]: identifier "FILE" is undefined D:\Backup\我的文档\TEST\main.c 7
Error[Pe020]: identifier "pf" is undefined D:\Backup\我的文档\TEST\main.c 7
Warning[Pe223]: function "fopen" declared implicitly D:\Backup\我的文档\TEST\main.c 11
Warning[Pe223]: function "fread" declared implicitly D:\Backup\我的文档\TEST\main.c 12
Warning[Pe223]: function "fclose" declared implicitly D:\Backup\我的文档\TEST\main.c 13
Error while running C/C++ compiler
我已经包含了stdio.h这个头文件 为什么还说 FILE 没有定义呢?
求高手解答啊!