记录详情

Compile Error

foo.cc: In function 'int compute(int*, int, int)':
foo.cc:30:32: error: array must be initialized with a brace-enclosed initializer
   30 |     int a[szline2]=a[szline2-1]+a[szline2];
      |                    ~~~~~~~~~~~~^~~~~~~~~~~
foo.cc:34:32: error: array must be initialized with a brace-enclosed initializer
   34 |     int a[szline3]=a[szline3-1]+a[szline3];
      |                    ~~~~~~~~~~~~^~~~~~~~~~~
foo.cc:36:25: error: array must be initialized with a brace-enclosed initializer
   36 |    int a[sum]=a[szline2]+a[szline3];
      |               ~~~~~~~~~~^~~~~~~~~~~
foo.cc:44:24: error: array must be initialized with a brace-enclosed initializer
   44 |    int a[sum]=a[szline4];
      |               ~~~~~~~~~^
foo.cc: In function 'int Choose(int*, int*, int*, int, int, int)':
foo.cc:56:15: error: array must be initialized with a brace-enclosed initializer
   56 |   int c[l]=b[l];
      |            ~~~^
foo.cc:56:7: warning: unused variable 'c' [-Wunused-variable]
   56 |   int c[l]=b[l];
      |       ^
foo.cc:62:8: warning: unused variable 'answer' [-Wunused-variable]
   62 |    int answer=c[l];
      |        ^~~~~~
foo.cc:66:8: warning: unused variable 'answer' [-Wunused-variable]
   66 |    int answer=c[l-1];
      |        ^~~~~~
foo.cc: In function 'int main()':
foo.cc:75:30: error: 'answer' was not declared in this scope
   75 |  int finish=Choose(a,b,c,sum,answer,n);
      |                              ^~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
比赛
2022暑期青少年社团(训练赛)
语言
C++
递交时间
2022-08-07 20:55:34
评测时间
2022-08-07 20:55:34
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes