Borderou de evaluare (job #1741475)

Utilizator adina0822Ciubotaru Adina-Maria adina0822 Data 14 august 2016 00:26:51
Problema Hashuri Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:11:2: error: reference to ‘hash’ is ambiguous hash *H[P]; ^ user.cpp:10:9: note: candidates are: struct hash struct hash {int inf; hash *urm;}; ^ In file included from /usr/include/c++/4.8/bits/basic_string.h:3033:0, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from user.cpp:2: /usr/include/c++/4.8/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash struct hash; ^ user.cpp:11:2: error: ‘hash’ does not name a type hash *H[P]; ^ user.cpp: In function ‘void insert(int)’: user.cpp:16:6: error: reference to ‘hash’ is ambiguous hash *p; ^ user.cpp:10:9: note: candidates are: struct hash struct hash {int inf; hash *urm;}; ^ In file included from /usr/include/c++/4.8/bits/basic_string.h:3033:0, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from user.cpp:2: /usr/include/c++/4.8/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash struct hash; ^ user.cpp:16:12: error: ‘p’ was not declared in this scope hash *p; ^ user.cpp:17:9: error: ‘H’ was not declared in this scope if(H[x%P]==NULL) ^ user.cpp:19:21: error: expected type-specifier before ‘hash’ H[x%P]=new hash; ^ user.cpp:19:21: error: expected ‘;’ before ‘hash’ user.cpp:27:16: error: expected type-specifier before ‘hash’ p=new hash;

Ceva nu functioneaza?