/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:43:22: error: expected unqualified-id before '[' token
     for (const auto &[x1, y1, x2, y2] : rects) {
                      ^
/in/foo.cc:43:22: error: expected ';' before '[' token
/in/foo.cc:43:23: error: 'x1' was not declared in this scope
     for (const auto &[x1, y1, x2, y2] : rects) {
                       ^~
/in/foo.cc:43:27: error: capture of non-variable 'double y1(double)' 
     for (const auto &[x1, y1, x2, y2] : rects) {
                           ^~
In file included from /usr/include/features.h:364:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/c++config.h:507,
                 from /usr/include/c++/6/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:33,
                 from /in/foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:251:1: note: 'double y1(double)' declared here
 __MATHCALL (y1,, (_Mdouble_));
 ^
/in/foo.cc:43:31: error: 'x2' was not declared in this scope
     for (const auto &[x1, y1, x2, y2] : rects) {
                               ^~
/in/foo.cc:43:35: error: 'y2' was not declared in this scope
     for (const auto &[x1, y1, x2, y2] : rects) {
                                   ^~
/in/foo.cc: In lambda function:
/in/foo.cc:43:39: error: expected '{' before ':' token
     for (const auto &[x1, y1, x2, y2] : rects) {
                                       ^
/in/foo.cc: In function 'int main()':
/in/foo.cc:43:39: error: expected ';' before ':' token
/in/foo.cc:43:39: error: expected primary-expression before ':' token
/in/foo.cc:43:39: error: expected ')' before ':' token
/in/foo.cc:43:39: error: expected primary-expression before ':' token

信息

递交者
类型
递交
题目
P1056 图形面积
语言
C++
递交时间
2024-07-24 17:27:16
评测时间
2024-07-24 17:27:16
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes