/in/foo.cc: In function 'void addedge(int, int)':
/in/foo.cc:13:3: error: reference to 'next' is ambiguous
next[num]=first[x];
^~~~
/in/foo.cc:8:31: note: candidates are: int next [400020]
queue <int> q;int first[maxn],next[maxm],vex[maxm],n,m,num=0;
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
/in/foo.cc:16:3: error: reference to 'next' is ambiguous
next[num]=first[y];
^~~~
/in/foo.cc:8:31: note: candidates are: int next [400020]
queue <int> q;int first[maxn],next[maxm],vex[maxm],n,m,num=0;
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:49:6: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
else
^~~~
/in/foo.cc:56:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else'
p=next[p];
^
/in/foo.cc:56:6: error: reference to 'next' is ambiguous
p=next[p];
^~~~
/in/foo.cc:8:31: note: candidates are: int next [400020]
queue <int> q;int first[maxn],next[maxm],vex[maxm],n,m,num=0;
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/bits/char_traits.h:39,
from /usr/include/c++/6/ios:40,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:205:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~