记录详情

Compile Error

foo.c: In function 'main':
foo.c:8:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
  int a[10005]{ '\0' }, b[10005]{ '\0' };
              ^
foo.c:8:16: warning: statement with no effect [-Wunused-value]
  int a[10005]{ '\0' }, b[10005]{ '\0' };
                ^~~~
foo.c:8:21: error: expected ';' before '}' token
  int a[10005]{ '\0' }, b[10005]{ '\0' };
                     ^
foo.c:8:22: error: expected expression before ',' token
  int a[10005]{ '\0' }, b[10005]{ '\0' };
                      ^
foo.c:8:24: error: 'b' undeclared (first use in this function)
  int a[10005]{ '\0' }, b[10005]{ '\0' };
                        ^
foo.c:8:24: note: each undeclared identifier is reported only once for each function it appears in
foo.c:8:22: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  int a[10005]{ '\0' }, b[10005]{ '\0' };
                      ^
foo.c:10:16: error: 'a' undeclared (first use in this function)
   scanf("%d", &a[i]);
                ^
foo.c: In function 'Unique':
foo.c:25:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
  int b[10005]{ '\0' },x;
              ^
foo.c:25:16: warning: statement with no effect [-Wunused-value]
  int b[10005]{ '\0' },x;
                ^~~~
foo.c:25:21: error: expected ';' before '}' token
  int b[10005]{ '\0' },x;
                     ^
foo.c:25:22: error: expected expression before ',' token
  int b[10005]{ '\0' },x;
                      ^
foo.c:25:23: error: 'x' undeclared (first use in this function)
  int b[10005]{ '\0' },x;
                       ^
foo.c:25:22: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  int b[10005]{ '\0' },x;
                      ^
foo.c:27:3: error: 'b' undeclared (first use in this function)
   b[i] = a[i];
   ^
foo.c: In function 'main':
foo.c:7:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d%d", &n, &p);
  ^~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A10-3 数组的去重
比赛
2021(四) 作业第二场:见面赛
语言
C
递交时间
2021-10-30 21:42:59
评测时间
2021-10-30 21:42:59
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes