Borderou de evaluare (job #1690159)

Utilizator ButmalaiDanButmalai Dan ButmalaiDan Data 14 aprilie 2016 20:30:14
Problema Hashuri Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:10:10: error: variable or field ‘add’ declared void void add(hash &p,int x){ ^ user.cpp:10:10: error: reference to ‘hash’ is ambiguous user.cpp:9:7: note: candidates are: typedef struct nod* hash }* hash; ^ 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:1: /usr/include/c++/4.8/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash struct hash; ^ user.cpp:10:16: error: ‘p’ was not declared in this scope void add(hash &p,int x){ ^ user.cpp:10:18: error: expected primary-expression before ‘int’ void add(hash &p,int x){ ^ user.cpp:17:4: error: reference to ‘hash’ is ambiguous hash a[100000]; ^ user.cpp:9:7: note: candidates are: typedef struct nod* hash }* hash; ^ 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:1: /usr/include/c++/4.8/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash struct hash; ^ user.cpp:17:4: error: ‘hash’ does not name a type hash a[100000]; ^ user.cpp: In function ‘int main()’: user.cpp:25:26: error: ‘a’ was not declared in this scope add(a[x%m],x); ^ user.cpp:25:34: error: ‘add’ was not declared in this scope add(a[x%m],x);

Ceva nu functioneaza?