记录详情

Compile Error

foo.c: In function ‘sushu’:
foo.c:8:32: error: ‘false’ undeclared (first use in this function)
    8 |                         return false;
      |                                ^~~~~
foo.c:2:1: note: ‘false’ is defined in header ‘<stdbool.h>’; did you forget to ‘#include <stdbool.h>’?
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
foo.c:8:32: note: each undeclared identifier is reported only once for each function it appears in
    8 |                         return false;
      |                                ^~~~~
foo.c:10:32: error: ‘true’ undeclared (first use in this function)
   10 |                         return true;
      |                                ^~~~
foo.c:10:32: note: ‘true’ is defined in header ‘<stdbool.h>’; did you forget to ‘#include <stdbool.h>’?
foo.c: In function ‘main’:
foo.c:18:22: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   18 |         for (int i=2;i=i+1;i<=num)
      |                      ^
foo.c:18:29: warning: statement with no effect [-Wunused-value]
   18 |         for (int i=2;i=i+1;i<=num)
      |                            ~^~~~~
foo.c: In function ‘sushu’:
foo.c:12:1: warning: control reaches end of non-void function [-Wreturn-type]
   12 | }
      | ^

信息

递交者
类型
递交
题目
A3-3 素数专题:素数个数
比赛
南师大(含泰州学院)2024年新生赛(第一场)
语言
C
递交时间
2024-08-15 11:43:52
评测时间
2024-08-15 11:43:52
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes