foo.cpp: In function 'int main()':
foo.cpp:145:50: error: reference to 'next' is ambiguous
for(int d=ebegin[cc];d;d=next[d])
^
foo.cpp:66:20: note: candidates are: int next [500000]
int ebegin[MAXMOD],next[MAXMOD],nume;
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:61,
from foo.cpp:4:
c:\mingw\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:154:29: error: reference to 'next' is ambiguous
next[nume]=ebegin[cc];
^
foo.cpp:66:20: note: candidates are: int next [500000]
int ebegin[MAXMOD],next[MAXMOD],nume;
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algobase.h:66:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:61,
from foo.cpp:4:
c:\mingw\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
^