Compile Error

foo.cc: In function 'int main()':
foo.cc:10:3: error: reference to 'move' is ambiguous
   10 |   move+=high*3;
      |   ^~~~
In file included from /usr/include/c++/9/deque:67,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:68,
                 from foo.cc:1:
/usr/include/c++/9/bits/stl_deque.h:443:5: note: candidates are: 'template<class _Tp> std::_Deque_iterator<_Tp, _Tp&, _Tp*> std::move(std::_Deque_iterator<_Tp, _Tp&, _Tp*>, std::_Deque_iterator<_Tp, _Tp&, _Tp*>, std::_Deque_iterator<_Tp, _Tp&, _Tp*>)'
  443 |     move(_Deque_iterator<_Tp, _Tp&, _Tp*> __first,
      |     ^~~~
In file included from /usr/include/c++/9/deque:69,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:68,
                 from foo.cc:1:
/usr/include/c++/9/bits/deque.tcc:1057:5: note:                 'template<class _Tp> std::_Deque_iterator<_Tp, _Tp&, _Tp*> std::move(std::_Deque_iterator<_Tp, const _Tp&, const _Tp*>, std::_Deque_iterator<_Tp, const _Tp&, const _Tp*>, std::_Deque_iterator<_Tp, _Tp&, _Tp*>)'
 1057 |     move(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first,
      |     ^~~~
In file included from /usr/include/c++/9/bits/char_traits.h:39,
                 from /usr/include/c++/9/ios:40,
                 from /usr/include/c++/9/istream:38,
                 from /usr/include/c++/9/sstream:38,
                 from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from foo.cc:1:
/usr/include/c++/9/bits/stl_algobase.h:497:5: note:                 'template<class _II, class _OI> _OI std::move(_II, _II, _OI)'
  497 |     move(_II __first, _II __last, _OI __result)
      |     ^~~~
In file included from /usr/include/c++/9/bits/nested_exception.h:40,
                 from /usr/include/c++/9/exception:144,
                 from /usr/include/c++/9/ios:39,
                 from /usr/include/c++/9/istream:38,
                 from /usr/include/c++/9/sstream:38,
                 from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from foo.cc:1:
/usr/include/c++/9/bits/move.h:99:5: note:                 'template<class _Tp> constexpr typename std::remove_reference<_Tp>::type&& std::move(_Tp&&)'
   99 |     move(_Tp&& __t) noexcept
      |     ^~~~
foo.cc:3:13: note:                 'double move'
    3 | double high,move;
      |             ^~~~
foo.cc:12:2: error: reference to 'move' is ambiguous
   12 |  move-=high;
      |  ^~~~
In file included from /usr/include/c++/9/deque:67,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:68,
                 from foo.cc:1:
/usr/include/c++/9/bits/stl_deque.h:443:5: note: candidates are: 'template<class _Tp> std::_Deque_iterator<_Tp, _Tp&, _Tp*> std::move(std::_Deque_iterator<_Tp, _Tp&, _Tp*>, std::_Deque_iterator<_Tp, _Tp&, _Tp*>, std::_Deque_iterator<_Tp, _Tp&, _Tp*>)'
  443 |     move(_Deque_iterator<_Tp, _Tp&, _Tp*> __first,
      |     ^~~~
In file included from /usr/include/c++/9/deque:69,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:68,
                 from foo.cc:1:
/usr/include/c++/9/bits/deque.tcc:1057:5: note:                 'template<class _Tp> std::_Deque_iterator<_Tp, _Tp&, _Tp*> std::move(std::_Deque_iterator<_Tp, const _Tp&, const _Tp*>, std::_Deque_iterator<_Tp, const _Tp&, const _Tp*>, std::_Deque_iterator<_Tp, _Tp&, _Tp*>)'
 1057 |     move(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first,
      |     ^~~~
In file included from /usr/include/c++/9/bits/char_traits.h:39,
                 from /usr/include/c++/9/ios:40,
                 from /usr/include/c++/9/istream:38,
                 from /usr/include/c++/9/sstream:38,
                 from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from foo.cc:1:
/usr/include/c++/9/bits/stl_algobase.h:497:5: note:                 'template<class _II, class _OI> _OI std::move(_II, _II, _OI)'
  497 |     move(_II __first, _II __last, _OI __result)
      |     ^~~~
In file included from /usr/include/c++/9/bits/nested_exception.h:40,
                 from /usr/include/c++/9/exception:144,
                 from /usr/include/c++/9/ios:39,
                 from /usr/include/c++/9/istream:38,
                 from /usr/include/c++/9/sstream:38,
                 from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from foo.cc:1:
/usr/include/c++/9/bits/move.h:99:5: note:                 'template<class _Tp> constexpr typename std::remove_reference<_Tp>::type&& std::move(_Tp&&)'
   99 |     move(_Tp&& __t) noexcept
      |     ^~~~
foo.cc:3:13: note:                 'double move'
    3 | double high,move;
      |             ^~~~
foo.cc:13:32: error: reference to 'move' is ambiguous
   13 |  cout<<fixed<<setprecision(2)<<move<<endl;
      |                                ^~~~
In file included from /usr/include/c++/9/deque:67,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:68,
                 from foo.cc:1:
/usr/include/c++/9/bits/stl_deque.h:443:5: note: candidates are: 'template<class _Tp> std::_Deque_iterator<_Tp, _Tp&, _Tp*> std::move(std::_Deque_iterator<_Tp, _Tp&, _Tp*>, std::_Deque_iterator<_Tp, _Tp&, _Tp*>, std::_Deque_iterator<_Tp, _Tp&, _Tp*>)'
  443 |     move(_Deque_iterator<_Tp, _Tp&, _Tp*> __first,
      |     ^~~~
In file included from /usr/include/c++/9/deque:69,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:68,
                 from foo.cc:1:
/usr/include/c++/9/bits/deque.tcc:1057:5: note:                 'template<class _Tp> std::_Deque_iterator<_Tp, _Tp&, _Tp*> std::move(std::_Deque_iterator<_Tp, const _Tp&, const _Tp*>, std::_Deque_iterator<_Tp, const _Tp&, const _Tp*>, std::_Deque_iterator<_Tp, _Tp&, _Tp*>)'
 1057 |     move(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first,
      |     ^~~~
In file included from /usr/include/c++/9/bits/char_traits.h:39,
                 from /usr/include/c++/9/ios:40,
                 from /usr/include/c++/9/istream:38,
                 from /usr/include/c++/9/sstream:38,
                 from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from foo.cc:1:
/usr/include/c++/9/bits/stl_algobase.h:497:5: note:                 'template<class _II, class _OI> _OI std::move(_II, _II, _OI)'
  497 |     move(_II __first, _II __last, _OI __result)
      |     ^~~~
In file included from /usr/include/c++/9/bits/nested_exception.h:40,
                 from /usr/include/c++/9/exception:144,
                 from /usr/include/c++/9/ios:39,
                 from /usr/include/c++/9/istream:38,
                 from /usr/include/c++/9/sstream:38,
                 from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from foo.cc:1:
/usr/include/c++/9/bits/move.h:99:5: note:                 'template<class _Tp> constexpr typename std::remove_reference<_Tp>::type&& std::move(_Tp&&)'
   99 |     move(_Tp&& __t) noexcept
      |     ^~~~
foo.cc:3:13: note:                 'double move'
    3 | double high,move;
      |             ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1063 球反弹高度(1)
语言
C++
递交时间
2022-07-14 14:41:06
评测时间
2022-07-14 14:41:06
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes