foo.cpp: In function 'void addedge(int, int, int)':
foo.cpp:34:67: error: reference to 'next' is ambiguous
void addedge(int u,int v,int w){edge[++size]=v;weight[size]=w;next[size]=pre[u],pre[u]=size;}
^
foo.cpp:33:38: note: candidates are: int next [300010]
int n,m,edge[MAXM],pre[MAXN]={0},next[MAXM]={0},weight[MAXM],size=0;
^
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:4:
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 dfs_down(int)':
foo.cpp:17:42: error: reference to 'next' is ambiguous
#define Forp(x) for(int p=pre[x];p;p=next[p])
^
foo.cpp:40:9: note: in expansion of macro 'Forp'
Forp(x)
^
foo.cpp:33:38: note: candidates are: int next [300010]
int n,m,edge[MAXM],pre[MAXN]={0},next[MAXM]={0},weight[MAXM],size=0;
^
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:4:
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 dfs_up(int)':
foo.cpp:17:42: error: reference to 'next' is ambiguous
#define Forp(x) for(int p=pre[x];p;p=next[p])
^
foo.cpp:55:9: note: in expansion of macro 'Forp'
Forp(x)
^
foo.cpp:33:38: note: candidates are: int next [300010]
int n,m,edge[MAXM],pre[MAXN]={0},next[MAXM]={0},weight[MAXM],size=0;
^
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:4:
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:17:42: error: reference to 'next' is ambiguous
#define Forp(x) for(int p=pre[x];p;p=next[p])
^
foo.cpp:64:9: note: in expansion of macro 'Forp'
Forp(x)
^
foo.cpp:33:38: note: candidates are: int next [300010]
int n,m,edge[MAXM],pre[MAXN]={0},next[MAXM]={0},weight[MAXM],size=0;
^
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:4:
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 find_circle(int)':
foo.cpp:17:42: error: reference to 'next' is ambiguous
#define Forp(x) for(int p=pre[x];p;p=next[p])
^
foo.cpp:89:9: note: in expansion of macro 'Forp'
Forp(x)
^
foo.cp