/in/foo.cc: In function 'int main()':
/in/foo.cc:15:3: error: reference to 'prev' is ambiguous
prev[i]=i-1;
^~~~
/in/foo.cc:3:5: note: candidates are: int prev [1000001]
int prev[1000001];
^~~~
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/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:217:5: note: template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
prev(_BidirectionalIterator __x, typename
^~~~
/in/foo.cc:28:8: error: reference to 'prev' is ambiguous
now=prev[now];
^~~~
/in/foo.cc:3:5: note: candidates are: int prev [1000001]
int prev[1000001];
^~~~
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/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:217:5: note: template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
prev(_BidirectionalIterator __x, typename
^~~~
/in/foo.cc:29:4: error: reference to 'prev' is ambiguous
prev[i+1]=now;
^~~~
/in/foo.cc:3:5: note: candidates are: int prev [1000001]
int prev[1000001];
^~~~
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/istream:38,
from /usr/include/c++/6/sstream:38,
from /usr/include/c++/6/complex:45,
from /usr/include/c++/6/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_iterator_base_funcs.h:217:5: note: template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
prev(_BidirectionalIterator __x, typename
^~~~