/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'void dfs1(int, int, int)':
/in/foo.cc:29:3: error: reference to 'end' is ambiguous
   end=x;
   ^~~
/in/foo.cc:21:11: note: candidates are: int end
 int start,end;
           ^~~
In file included from /usr/include/c++/6/string:51:0,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:2:
/usr/include/c++/6/bits/range_access.h:97:5: note:                 template<class _Tp, long unsigned int _Nm> _Tp* std::end(_Tp (&)[_Nm])
     end(_Tp (&__arr)[_Nm])
     ^~~
/usr/include/c++/6/bits/range_access.h:78:5: note:                 template<class _Container> decltype (__cont.end()) std::end(const _Container&)
     end(const _Container& __cont) -> decltype(__cont.end())
     ^~~
/usr/include/c++/6/bits/range_access.h:68:5: note:                 template<class _Container> decltype (__cont.end()) std::end(_Container&)
     end(_Container& __cont) -> decltype(__cont.end())
     ^~~
In file included from /usr/include/c++/6/bits/range_access.h:36:0,
                 from /usr/include/c++/6/string:51,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:2:
/usr/include/c++/6/initializer_list:99:5: note:                 template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)
     end(initializer_list<_Tp> __ils) noexcept
     ^~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:82:9: error: reference to 'end' is ambiguous
     pre[end]=end;
         ^~~
/in/foo.cc:21:11: note: candidates are: int end
 int start,end;
           ^~~
In file included from /usr/include/c++/6/string:51:0,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:2:
/usr/include/c++/6/bits/range_access.h:97:5: note:                 template<class _Tp, long unsigned int _Nm> _Tp* std::end(_Tp (&)[_Nm])
     end(_Tp (&__arr)[_Nm])
     ^~~
/usr/include/c++/6/bits/range_access.h:78:5: note:                 template<class _Container> decltype (__cont.end()) std::end(const _Container&)
     end(const _Container& __cont) -> decltype(__cont.end())
     ^~~
/usr/include/c++/6/bits/range_access.h:68:5: note:                 template<class _Container> decltype (__cont.end()) std::end(_Container&)
     end(_Container& __cont) -> decltype(__cont.end())
     ^~~
In file included from /usr/include/c++/6/bits/range_access.h:36:0,
                 from /usr/include/c++/6/string:51,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:2:
/usr/include/c++/6/initializer_list:99:5: note:                 template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)
     end(initializer_list<_Tp> __ils) noexcept
     ^~~
/in/foo.cc:82:14: error: reference to 'end' is ambiguous
     pre[end]=end;
              ^~~
/in/foo.cc:21:11: note: candidates are: int end
 int start,end;
           ^~~
In file included from /usr/include/c++/6/string:51:0,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:2:
/usr/include/c++/6/bits/range_access.h:97:5: note:                 template<class _Tp, long unsigned int _Nm> _Tp* std::end(_Tp (&)[_Nm])
     end(_Tp (&__arr)[_Nm])
     ^~~
/usr/include/c++/6/bits/range_access.h:78:5: note:                 template<class _Container> decltype (__cont.end()) std::end(const _Container&)
     end(const _Container& __cont) -> decltype(__cont.end())
     ^~~
/usr/include/c++/6/bits/range_access.h:68:5: note:                 template<class _Container> decltype (__cont.end()) std::end(_Container&)
     end(_Container& __cont) -> decltype(__cont.end())
     ^~~
In file included from /usr/include/c++/6/bits/range_access.h:36:0,
                 from /usr/include/c++/6/string:51,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:2:
/usr/include/c++/6/initializer_list:99:5: note:                 template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)
     end(initializer_list<_Tp> __ils) noexcept
     ^~~
/in/foo.cc:83:10: error: reference to 'end' is ambiguous
     dfs2(end,0,0);
          ^~~
/in/foo.cc:21:11: note: candidates are: int end
 int start,end;
           ^~~
In file included from /usr/include/c++/6/string:51:0,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:2:
/usr/include/c++/6/bits/range_access.h:97:5: note:                 template<class _Tp, long unsigned int _Nm> _Tp* std::end(_Tp (&)[_Nm])
     end(_Tp (&__arr)[_Nm])
     ^~~
/usr/include/c++/6/bits/range_access.h:78:5: note:                 template<class _Container> decltype (__cont.end()) std::end(const _Container&)
     end(const _Container& __cont) -> decltype(__cont.end())
     ^~~
/usr/include/c++/6/bits/range_access.h:68:5: note:                 template<class _Container> decltype (__cont.end()) std::end(_Container&)
     end(_Container& __cont) -> decltype(__cont.end())
     ^~~
In file included from /usr/include/c++/6/bits/range_access.h:36:0,
                 from /usr/include/c++/6/string:51,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:2:
/usr/include/c++/6/initializer_list:99:5: note:                 template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)
     end(initializer_list<_Tp> __ils) noexcept
     ^~~

信息

递交者
类型
递交
题目
P1476 旅游规划(csapc)
语言
C++
递交时间
2018-08-26 19:24:53
评测时间
2018-08-26 19:24:53
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes