记录详情

Compile Error

In file included from foo.c:1:
/nix/store/rffag931pvbdiabwwa539wnwg1piqpx0-glibc-2.35-163-dev/include/bits/stdio.h:23:3: error: #error "Never include <bits/stdio.h> directly; use <stdio.h> instead."
   23 | # error "Never include <bits/stdio.h> directly; use <stdio.h> instead."
      |   ^~~~~
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 'main':
foo.c:6:9: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |         scanf("%d%d", &a, &b);
      |         ^~~~~
foo.c:2:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    1 | # include<bits/stdio.h>
  +++ |+#include <stdio.h>
    2 | using namespace std;
foo.c:6:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |         scanf("%d%d", &a, &b);
      |         ^~~~~
foo.c:6:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
foo.c:10:9: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   10 |         printf("%d", x);
      |         ^~~~~~
foo.c:10:9: note: include '<stdio.h>' or provide a declaration of 'printf'
foo.c:10:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
foo.c:10:9: note: include '<stdio.h>' or provide a declaration of 'printf'
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A2-1 循环结构入门:数列求和
语言
C
递交时间
2022-10-04 15:26:04
评测时间
2022-10-04 15:26:04
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes