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