Compile Error

/in/foo.c: In function 'main':
/in/foo.c:4:9: error: unknown type name 'bool'
    4 |         bool flag;
      |         ^~~~
/in/foo.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | int main(int argc, char **argv) {
/in/foo.c:7:15: error: 'true' undeclared (first use in this function)
    7 |         while(true) {
      |               ^~~~
/in/foo.c:7:15: note: 'true' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
/in/foo.c:7:15: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:12:40: error: 'false' undeclared (first use in this function)
   12 |                                 flag = false;
      |                                        ^~~~~
/in/foo.c:12:40: note: 'false' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?

信息

递交者
类型
递交
题目
P2557 小猫分鱼3级T1 2023.12
语言
C
递交时间
2026-08-09 16:49:34
评测时间
2026-08-09 16:49:34
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes