foo.cpp: In function 'void add(int, int, int)':
foo.cpp:46:2: error: reference to 'next' is ambiguous
next[ce]=head[x];
^
foo.cpp:15:5: note: candidates are: int next [620000]
int next[N<<1],to[N<<1],val[N<<1],head[N],ce;
^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\algorithm:61,
from foo.cpp:3:
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\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 dfs1(int)':
foo.cpp:58:20: error: reference to 'next' is ambiguous
for(i=head[x];i;i=next[i])
^
foo.cpp:15:5: note: candidates are: int next [620000]
int next[N<<1],to[N<<1],val[N<<1],head[N],ce;
^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\algorithm:61,
from foo.cpp:3:
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\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 dfs2(int)':
foo.cpp:77:20: error: reference to 'next' is ambiguous
for(i=head[x];i;i=next[i])
^
foo.cpp:15:5: note: candidates are: int next [620000]
int next[N<<1],to[N<<1],val[N<<1],head[N],ce;
^
In file included from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
from c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\include\c++\algorithm:61,
from foo.cpp:3:
c:\tdm-gcc-32\lib\gcc\mingw32\4.8.1\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
^