/in/foo.cc: In function 'void getnext()':
/in/foo.cc:25:8: error: reference to 'next' is ambiguous
k = next[k-1];
^~~~
/in/foo.cc:11:5: note: candidates are: int next [201]
int next[201];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc:1:
/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
^~~~
/in/foo.cc:28:3: error: reference to 'next' is ambiguous
next[i] = k;
^~~~
/in/foo.cc:11:5: note: candidates are: int next [201]
int next[201];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc:1:
/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
^~~~
/in/foo.cc: In function 'int kmp()':
/in/foo.cc:34:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i=0, j=0; i<T.length(); ++i) {
~^~~~~~~~~~~
/in/foo.cc:36:8: error: reference to 'next' is ambiguous
j = next[j-1];
^~~~
/in/foo.cc:11:5: note: candidates are: int next [201]
int next[201];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc:1:
/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
^~~~
/in/foo.cc:39:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (j == P.length()) {
~~^~~~~~~~~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:48:9: error: reference to 'next' is ambiguous
memset(next, 0, sizeof(next));
^~~~
/in/foo.cc:11:5: note: candidates are: int next [201]
int next[201];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc:1:
/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
^~~~
/in/foo.cc:48:25: error: reference to 'next' is ambiguous
memset(next, 0, sizeof(next));
^~~~
/in/foo.cc:11:5: note: candidates are: int next [201]
int next[201];
^~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:66:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from /in/foo.cc:1:
/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
^~~~
/in/foo.cc: In function 'int kmp()':
/in/foo.cc:43:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^