记录详情

Compile Error

foo.c:8:1: error: unknown type name 'bool'; did you mean '_Bool'?
 bool isBD(char c);
 ^~~~
 _Bool
foo.c:9:28: error: unknown type name 'WordCount'
 int GetWordCount(char s[], WordCount WC[]);
                            ^~~~~~~~~
foo.c:10:12: error: unknown type name 'WordCount'
 int Insert(WordCount WC[],int n, WordCount wc);
            ^~~~~~~~~
foo.c:10:34: error: unknown type name 'WordCount'
 int Insert(WordCount WC[],int n, WordCount wc);
                                  ^~~~~~~~~
foo.c: In function 'main':
foo.c:14:2: warning: 'gets' is deprecated [-Wdeprecated-declarations]
  gets(s);
  ^~~~
In file included from /usr/include/stdio.h:862:0,
                 from foo.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:232:1: note: declared here
 gets (char *__str)
 ^~~~
foo.c:15:2: error: unknown type name 'WordCount'; use 'struct' keyword to refer to the type
  WordCount  WC[100];  int n=0;
  ^~~~~~~~~
  struct 
foo.c:16:6: warning: implicit declaration of function 'GetWordCount' [-Wimplicit-function-declaration]
  n = GetWordCount(s, WC);
      ^~~~~~~~~~~~
foo.c:17:15: error: request for member 'count' in something not a structure or union
  int max=WC[0].count ;
               ^
foo.c:20:11: error: request for member 'count' in something not a structure or union
   if(WC[i].count>max)
           ^
foo.c:21:12: error: request for member 'count' in something not a structure or union
   max=WC[i].count;
            ^
foo.c:25:11: error: request for member 'count' in something not a structure or union
   if(WC[i].count==max)
           ^
foo.c:26:13: error: request for member 'Word' in something not a structure or union
   puts(WC[i].Word);
             ^
foo.c: At top level:
foo.c:30:28: error: unknown type name 'WordCount'
 int GetWordCount(char s[], WordCount WC[])
                            ^~~~~~~~~
foo.c:58:12: error: unknown type name 'WordCount'
 int Insert(WordCount WC[],int n, WordCount wc)
            ^~~~~~~~~
foo.c:58:34: error: unknown type name 'WordCount'
 int Insert(WordCount WC[],int n, WordCount wc)
                                  ^~~~~~~~~
foo.c:74:1: error: unknown type name 'bool'; did you mean '_Bool'?
 bool isBD(char c)
 ^~~~
 _Bool
foo.c: In function 'isBD':
foo.c:79:11: error: 'true' undeclared (first use in this function); did you mean 'strlen'?
    return true;
           ^~~~
           strlen
foo.c:79:11: note: each undeclared identifier is reported only once for each function it appears in
foo.c:80:9: error: 'false' undeclared (first use in this function); did you mean 'fclose'?
  return false;
         ^~~~~
         fclose
foo.c: In function 'main':
foo.c:14:2: warning: ignoring return value of 'gets', declared with attribute warn_unused_result [-Wunused-result]
  gets(s);
  ^~~~~~~
foo.c: In function 'isBD':
foo.c:81:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
6-10 哪个字母对用得最多
比赛
2021(四) 作业第三场:热身赛
语言
C
递交时间
2021-11-15 16:56:28
评测时间
2021-11-15 16:56:28
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes