foo.cpp: In function 'int try_to_insert(int)':
foo.cpp:27:10: error: reference to 'hash' is ambiguous
int h = hash(st[s]);
^~~~
foo.cpp:19:5: note: candidates are: int hash(int (&)[9])
int hash(State& s){
^~~~
In file included from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/basic_string.h:5628:0,
from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/string:52,
from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/locale_classes.h:40,
from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/ios_base.h:41,
from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/ios:42,
from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/ostream:38,
from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/iostream:39,
from foo.cpp:1:
C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
foo.cpp:32:7: error: reference to 'next' is ambiguous
u = next[u];
^~~~
foo.cpp:16:21: note: candidates are: int next [1000000]
int head[hashsize], next[MaxState];
^~~~
In file included from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/stl_algobase.h:66:0,
from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/char_traits.h:39,
from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/ios:40,
from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/ostream:38,
from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/iostream:39,
from foo.cpp:1:
C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/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
^~~~
foo.cpp:34:2: error: reference to 'next' is ambiguous
next[s] = head[h];
^~~~
foo.cpp:16:21: note: candidates are: int next [1000000]
int head[hashsize], next[MaxState];
^~~~
In file included from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/stl_algobase.h:66:0,
from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/bits/char_traits.h:39,
from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/ios:40,
from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/ostream:38,
from C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/iostream:39,
from foo.cpp:1:
C:/MinGW32/lib/gcc/i686-w64-mingw32/6.3.0/include/c++/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
^~~~