记录详情

Compile Error

/in/foo.cc: In function 'void getMin(int)':
/in/foo.cc:10:22: error: reference to 'min' is ambiguous
  for (int i = 0; i < min.size(); i++) {
                      ^~~
/in/foo.cc:7:13: note: candidates are: std::vector<int> min
 vector<int> min;
             ^~~
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                 from /usr/include/c++/6/ios:40,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_algobase.h:243:5: note:                 template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^~~
/usr/include/c++/6/bits/stl_algobase.h:195:5: note:                 template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
     min(const _Tp& __a, const _Tp& __b)
     ^~~
/in/foo.cc:11:11: error: reference to 'min' is ambiguous
   if (d < min[i]) {
           ^~~
/in/foo.cc:7:13: note: candidates are: std::vector<int> min
 vector<int> min;
             ^~~
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                 from /usr/include/c++/6/ios:40,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_algobase.h:243:5: note:                 template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^~~
/usr/include/c++/6/bits/stl_algobase.h:195:5: note:                 template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
     min(const _Tp& __a, const _Tp& __b)
     ^~~
/in/foo.cc:12:4: error: reference to 'min' is ambiguous
    min.insert(min.begin() + i, d);
    ^~~
/in/foo.cc:7:13: note: candidates are: std::vector<int> min
 vector<int> min;
             ^~~
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                 from /usr/include/c++/6/ios:40,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_algobase.h:243:5: note:                 template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^~~
/usr/include/c++/6/bits/stl_algobase.h:195:5: note:                 template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
     min(const _Tp& __a, const _Tp& __b)
     ^~~
/in/foo.cc:12:15: error: reference to 'min' is ambiguous
    min.insert(min.begin() + i, d);
               ^~~
/in/foo.cc:7:13: note: candidates are: std::vector<int> min
 vector<int> min;
             ^~~
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                 from /usr/include/c++/6/ios:40,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_algobase.h:243:5: note:                 template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^~~
/usr/include/c++/6/bits/stl_algobase.h:195:5: note:                 template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
     min(const _Tp& __a, const _Tp& __b)
     ^~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:28:2: error: reference to 'min' is ambiguous
  min.push_back(9999999999);
  ^~~
/in/foo.cc:7:13: note: candidates are: std::vector<int> min
 vector<int> min;
             ^~~
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                 from /usr/include/c++/6/ios:40,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_algobase.h:243:5: note:                 template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^~~
/usr/include/c++/6/bits/stl_algobase.h:195:5: note:                 template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
     min(const _Tp& __a, const _Tp& __b)
     ^~~
/in/foo.cc:36:12: error: reference to 'min' is ambiguous
   count += min[i];
            ^~~
/in/foo.cc:7:13: note: candidates are: std::vector<int> min
 vector<int> min;
             ^~~
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                 from /usr/include/c++/6/ios:40,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_algobase.h:243:5: note:                 template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^~~
/usr/include/c++/6/bits/stl_algobase.h:195:5: note:                 template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)
     min(const _Tp& __a, const _Tp& __b)
     ^~~

信息

递交者
类型
递交
题目
(ty 1-5) 盖板子
比赛
2019-1-20寒假集训1
语言
C++
递交时间
2019-01-20 11:49:45
评测时间
2019-01-20 11:49:45
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes