foo.cpp: In function 'void adde(int, int, int)':
foo.cpp:22:18: error: reference to 'next' is ambiguous
cnt++,to[cnt]=t,next[cnt]=head[f],head[f]=cnt,w[cnt]=ww;
^
foo.cpp:19:28: note: candidates are: int next [600020]
int head[MAXN],to[MAXN<<1],next[MAXN<<1],w[MAXN<<1],cnt=1;
^
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++/ostream:38,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/iostream:39,
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:23:18: error: reference to 'next' is ambiguous
cnt++,to[cnt]=f,next[cnt]=head[t],head[t]=cnt,w[cnt]=ww;
^
foo.cpp:19:28: note: candidates are: int next [600020]
int head[MAXN],to[MAXN<<1],next[MAXN<<1],w[MAXN<<1],cnt=1;
^
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++/ostream:38,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/iostream:39,
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: In function 'void BFS(int)':
foo.cpp:33:25: error: reference to 'next' is ambiguous
for(int i=head[x];i;i=next[i])
^
foo.cpp:19:28: note: candidates are: int next [600020]
int head[MAXN],to[MAXN<<1],next[MAXN<<1],w[MAXN<<1],cnt=1;
^
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++/ostream:38,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/iostream:39,
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: In function 'void bfs(int)':
foo.cpp:92:25: error: reference to 'next' is ambiguous
for(int i=head[x];i;i=next[i])
^
foo.cpp:19:28: note: candidates are: int next [600020]
int head[MAXN],to[MAXN<<1],next[MAXN<<1],w[MAXN<<1],cnt=1;
^
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++/ostream:38,
from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/iostream:39,
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: