foo.cpp: In function 'void update(City, City)':
foo.cpp:19:6: error: reference to 'next' is ambiguous
if(!next[x.num][0])
^
foo.cpp:15: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++/bits/char_traits.h:39,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ios:40,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/istream:38,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/sstream:38,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/complex:45,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ccomplex:38,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/mingw32/bits/stdc++.h:52,
from foo.cpp:1:
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:21:3: error: reference to 'next' is ambiguous
next[x.num][0]=y.num;
^
foo.cpp:15: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++/bits/char_traits.h:39,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ios:40,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/istream:38,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/sstream:38,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/complex:45,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ccomplex:38,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/mingw32/bits/stdc++.h:52,
from foo.cpp:1:
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:24: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:15: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++/bits/char_traits.h:39,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ios:40,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/istream:38,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/sstream:38,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/complex:45,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/ccomplex:38,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/mingw32/bits/stdc++.h:52,
from foo.cpp:1:
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:3: error: reference to 'next' is ambiguous
next[x.num][1]=next[x.num][0];
^
foo.cpp:15:12: note: candidates are: int next [100010][2]
int n,x0,m,next[maxn][2