/in/foo.cc: In function 'void getnext()':
/in/foo.cc:33:2: error: reference to 'next' is ambiguous
next[1]=0;
^~~~
/in/foo.cc:30:5: note: candidates are: int next [250]
int next[250];
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/algorithm:61,
from /in/foo.cc:4:
/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:36:28: error: reference to 'next' is ambiguous
while(j&&s[j+1]!=s[i]) j=next[j];
^~~~
/in/foo.cc:30:5: note: candidates are: int next [250]
int next[250];
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/algorithm:61,
from /in/foo.cc:4:
/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:38:3: error: reference to 'next' is ambiguous
next[i]=j;
^~~~
/in/foo.cc:30:5: note: candidates are: int next [250]
int next[250];
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/algorithm:61,
from /in/foo.cc:4:
/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 'void kmp()':
/in/foo.cc:45:28: error: reference to 'next' is ambiguous
while(j&&s[j+1]!=t[i]) j=next[j];
^~~~
/in/foo.cc:30:5: note: candidates are: int next [250]
int next[250];
^~~~
In file included from /usr/include/c++/6/bits/stl_algobase.h:66:0,
from /usr/include/c++/6/algorithm:61,
from /in/foo.cc:4:
/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
^~~~