/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'void update(City, City)':
foo.cpp:21:6: error: reference to 'next' is ambiguous
  if(!next[x.num][0])
      ^
foo.cpp:17:12: note: candidates are: int next [100010][2]
 int n,x0,m,next[maxn][2],dist[maxn][2],g[maxn][21];
            ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
                 from foo.cpp:2:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
foo.cpp:23:3: error: reference to 'next' is ambiguous
   next[x.num][0]=y.num;
   ^
foo.cpp:17:12: note: candidates are: int next [100010][2]
 int n,x0,m,next[maxn][2],dist[maxn][2],g[maxn][21];
            ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
                 from foo.cpp:2:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
foo.cpp:26:76: error: reference to 'next' is ambiguous
  else if(abs(x.h-y.h)<dist[x.num][0]||(abs(x.h-y.h)==dist[x.num][0]&&y.h<h[next[x.num][0]].h))
                                                                            ^
foo.cpp:17:12: note: candidates are: int next [100010][2]
 int n,x0,m,next[maxn][2],dist[maxn][2],g[maxn][21];
            ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
                 from foo.cpp:2:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
foo.cpp:28:3: error: reference to 'next' is ambiguous
   next[x.num][1]=next[x.num][0];
   ^
foo.cpp:17:12: note: candidates are: int next [100010][2]
 int n,x0,m,next[maxn][2],dist[maxn][2],g[maxn][21];
            ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
                 from foo.cpp:2:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
foo.cpp:28:18: error: reference to 'next' is ambiguous
   next[x.num][1]=next[x.num][0];
                  ^
foo.cpp:17:12: note: candidates are: int next [100010][2]
 int n,x0,m,next[maxn][2],dist[maxn][2],g[maxn][21];
            ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algobase.h:66:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:61,
                 from foo.cpp:2:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:                 template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
     next(_ForwardIterator __x, typename
     ^
foo.cpp:30:3: error: reference to 'next' is ambiguous
   next[x.num][0]=y.num;
   ^
foo.cpp:17:12: note: candidates are: int next [100010][2]
 int n,x0,m,next[maxn][2],dist[maxn][2],g[maxn][21];
            ^
In file included from C:/TDM-GCC-32/li

信息

递交者
类型
递交
题目
P1780 开车旅行
语言
C++
递交时间
2015-11-06 08:38:09
评测时间
2015-11-06 08:38:36
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes