/ /

记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:22:3: error: reference to 'right' is ambiguous
   right[ii]=i;
   ^~~~~
foo.cc:3:5: note: candidates are: int right [100]
 int right[100],wrong[100];
     ^~~~~
In file included from /usr/include/c++/7/ios:42:0,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from foo.cc:1:
/usr/include/c++/7/bits/ios_base.h:1007:3: note:                 std::ios_base& std::right(std::ios_base&)
   right(ios_base& __base)
   ^~~~~
foo.cc:31:10: error: reference to 'right' is ambiguous
     swap(right[i],right[j]);
          ^~~~~
foo.cc:3:5: note: candidates are: int right [100]
 int right[100],wrong[100];
     ^~~~~
In file included from /usr/include/c++/7/ios:42:0,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from foo.cc:1:
/usr/include/c++/7/bits/ios_base.h:1007:3: note:                 std::ios_base& std::right(std::ios_base&)
   right(ios_base& __base)
   ^~~~~
foo.cc:31:19: error: reference to 'right' is ambiguous
     swap(right[i],right[j]);
                   ^~~~~
foo.cc:3:5: note: candidates are: int right [100]
 int right[100],wrong[100];
     ^~~~~
In file included from /usr/include/c++/7/ios:42:0,
                 from /usr/include/c++/7/istream:38,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from foo.cc:1:
/usr/include/c++/7/bits/ios_base.h:1007:3: note:                 std::ios_base& std::right(std::ios_base&)
   right(ios_base& __base)
   ^~~~~
foo.cc:36:16: error: 'v' was not declared in this scope
  for(int i=0;i<v.size();i++)
                ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P2472 近似排序
语言
C++
递交时间
2021-11-04 21:51:53
评测时间
2021-11-04 21:51:53
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes