记录详情

Compile Error

foo.c:2:1: error: unknown type name 'using'
    2 | using namespace std;
      | ^~~~~
foo.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    2 | using namespace std;
      |                 ^~~
foo.c: In function 'sushu':
foo.c:8:16: 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 | using namespace std;
foo.c:8:16: note: each undeclared identifier is reported only once for each function it appears in
    8 |         return false;
      |                ^~~~~
foo.c:14:12: error: 'true' undeclared (first use in this function)
   14 |     return true;
      |            ^~~~
foo.c:14:12: note: 'true' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
foo.c: In function 'sushugeshu':
foo.c:22:26: error: 'true' undeclared (first use in this function)
   22 |         if (sushu(a[i])==true)
      |                          ^~~~
foo.c:22:26: note: 'true' is defined in header '<stdbool.h>'; did you forget to '#include <stdbool.h>'?
foo.c: In function 'main':
foo.c:34:5: warning: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   34 |     scanf_s("%d %d", &n1,&n2);
      |     ^~~~~~~
      |     scanf
foo.c: In function 'sushu':
foo.c:15:1: warning: control reaches end of non-void function [-Wreturn-type]
   15 | }
      | ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A9-1 数组中的素数个数
比赛
2023 程序设计与竞赛(作业5:从数组看集体)
语言
C
递交时间
2023-10-21 13:16:42
评测时间
2023-10-21 13:16:42
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes