/in/foo.cc:16:48: error: ISO C++ forbids declaration of 'operator<' with no type [-fpermissive]
friend operator < (const Node &a,const Node &b){
^
/in/foo.cc: In function 'int cantor(const char*)':
/in/foo.cc:57:10: error: reference to 'hash' is ambiguous
cnt += hash[i] * tmp;
^~~~
/in/foo.cc:11:5: note: candidates are: int hash [10]
int hash[10];
^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
from /usr/include/c++/6/string:52,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/6/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:139:2: error: reference to 'hash' is ambiguous
hash[0]=1;
^~~~
/in/foo.cc:11:5: note: candidates are: int hash [10]
int hash[10];
^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
from /usr/include/c++/6/string:52,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/6/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
/in/foo.cc:141:3: error: reference to 'hash' is ambiguous
hash[i] = hash[i-1] * i;
^~~~
/in/foo.cc:11:5: note: candidates are: int hash [10]
int hash[10];
^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
from /usr/include/c++/6/string:52,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/6/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
/in/foo.cc:141:13: error: reference to 'hash' is ambiguous
hash[i] = hash[i-1] * i;
^~~~
/in/foo.cc:11:5: note: candidates are: int hash [10]
int hash[10];
^~~~
In file included from /usr/include/c++/6/bits/basic_string.h:5643:0,
from /usr/include/c++/6/string:52,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:1:
/usr/include/c++/6/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash
struct hash;
^~~~
/in/foo.cc: In function 'int search(Node)':
/in/foo.cc:135:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^