记录详情

Compile Error

foo.c:19:9: error: unknown type name 'bool'
   19 |         bool operator < (StatUnit objUnit) const
      |         ^~~~
foo.c:19:23: error: expected ':', ',', ';', '}' or '__attribute__' before '<' token
   19 |         bool operator < (StatUnit objUnit) const
      |                       ^
foo.c:28:21: error: expected ')' before '<' token
   28 | void StatExecute(set<StatUnit> &setStatResult, char* strSample);
      |                     ^
      |                     )
foo.c:30:17: error: expected ')' before '&' token
   30 | void Trim(string &strInstance)
      |                 ^~
      |                 )
foo.c:71:39: error: unknown type name 'set'
   71 | void GetStatResult(char* strInstance, set<StatUnit> &setStatResult)
      |                                       ^~~
foo.c:133:21: error: expected ')' before '<' token
  133 | void StatExecute(set<StatUnit> &setStatResult, char* strSample)
      |                     ^
      |                     )
foo.c: In function 'main':
foo.c:178:9: warning: 'gets' is deprecated [-Wdeprecated-declarations]
  178 |         gets(strTest);
      |         ^~~~
In file included from foo.c:2:
/nix/store/y8wfrgk7br5rfz4221lfb9v8w3n0cnyd-glibc-2.37-8-dev/include/stdio.h:605:14: note: declared here
  605 | extern char *gets (char *__s) __wur __attribute_deprecated__;
      |              ^~~~
foo.c:179:9: error: 'set' undeclared (first use in this function)
  179 |         set<StatUnit> setStatResult;
      |         ^~~
foo.c:179:9: note: each undeclared identifier is reported only once for each function it appears in
foo.c:179:13: error: 'StatUnit' undeclared (first use in this function)
  179 |         set<StatUnit> setStatResult;
      |             ^~~~~~~~
foo.c:179:23: error: 'setStatResult' undeclared (first use in this function)
  179 |         set<StatUnit> setStatResult;
      |                       ^~~~~~~~~~~~~
foo.c:180:9: warning: implicit declaration of function 'GetStatResult' [-Wimplicit-function-declaration]
  180 |         GetStatResult(strTest, setStatResult);
      |         ^~~~~~~~~~~~~
foo.c:181:22: error: expected expression before ':' token
  181 |         set<StatUnit>::iterator theIterator;
      |                      ^
foo.c:182:14: error: 'theIterator' undeclared (first use in this function)
  182 |         for (theIterator = setStatResult.begin(); theIterator != setStatResult.end(); theIterator++)
      |              ^~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1057 OO11-9 set与单词统计
语言
C
递交时间
2023-10-23 11:39:51
评测时间
2023-10-23 11:39:51
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes