2 onewayoranother OneWayOrAnother 于 2016.09.06 11:50 提问

C: unknown typename 'FILE'

anonymous-@Anonymous:~/c/wordscounter/improved$ gcc -Wall -std=c99 sysfilelimits.h file_count.h file_count.c get_filename.h get_filename.c open_file.h open_file.c wordscount.c -o wordscount
file_count.h:8:17: error: unknown type name ‘FILE’
void file_count(FILE *fp); // no-buffer
^
file_count.c:3:17: error: unknown type name ‘FILE’
void file_count(FILE *fp)
^
open_file.h:4:1: error: unknown type name ‘FILE’
FILE *open_file(char *filename);
^
In file included from wordscount.c:3:0:
open_file.h:4:1: error: unknown type name ‘FILE’
FILE *open_file(char *filename);
^
In file included from wordscount.c:4:0:
file_count.h:8:17: error: unknown type name ‘FILE’
void file_count(FILE *fp); // no-buffer
^
wordscount.c: In function ‘main’:
wordscount.c:19:7: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
fp=open_file(str);
^
wordscount.c:20:5: warning: implicit declaration of function ‘file_count’ [-Wimplicit-function-declaration]
file_count(fp);

^

谁能帮帮我。。。行行好。。。

1个回答

shihengzhen101
shihengzhen101   Rxr 2016.09.06 11:54

你加头文件stdio.h了吗

OneWayOrAnother
OneWayOrAnother 咦。。。真的管用。。 谢谢啦
一年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!