rail.cpp: In function 'void findLocation(int, int, int*, int*)':
rail.cpp:83:4: error: reference to 'next' is ambiguous
next[v] = tmp;
^~~~
rail.cpp:9:15: note: candidates are: int next [5010]
int bef[5010],next[5010];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/algorithm:61,
from rail.cpp:2:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
rail.cpp:95:61: error: reference to 'next' is ambiguous
if(location[nv] < location[v] && location[v] < location[next[nv]]) break;
^~~~
rail.cpp:9:15: note: candidates are: int next [5010]
int bef[5010],next[5010];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/algorithm:61,
from rail.cpp:2:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~
rail.cpp:100:10: error: reference to 'next' is ambiguous
next[v] = tmp;
^~~~
rail.cpp:9:15: note: candidates are: int next [5010]
int bef[5010],next[5010];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/algorithm:61,
from rail.cpp:2:
/usr/include/c++/7/bits/stl_iterator_base_funcs.h:208:5: note: template<class _ForwardIterator> _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type)
next(_ForwardIterator __x, typename
^~~~