记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:10:7: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   10 |   bool[i] = 1;
      |       ^
foo.cc:10:7: error: structured binding declaration cannot have type 'bool'
   10 |   bool[i] = 1;
      |       ^~~
foo.cc:10:7: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
foo.cc:10:9: error: redeclaration of 'auto i'
   10 |   bool[i] = 1;
      |         ^
foo.cc:8:11: note: 'int i' previously declared here
    8 |  for (int i = 0; i < 100001; i++)
      |           ^
foo.cc:10:7: error: cannot decompose non-array non-class type 'int'
   10 |   bool[i] = 1;
      |       ^~~
foo.cc:10:7: warning: unused structured binding declaration [-Wunused-variable]
foo.cc:38:19: warning: comparison of constant '-1' with boolean expression is always false [-Wbool-compare]
   38 |     while (num[X] == -1)
      |            ~~~~~~~^~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P3066 删除区间
语言
C++
递交时间
2022-04-04 16:15:37
评测时间
2022-04-04 16:15:37
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes