Borderou de evaluare (job #2107046)

Utilizator Corneliu10Dumitru Corneliu Corneliu10 Data 16 ianuarie 2018 18:32:09
Problema Abc2 Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int main()’: user.cpp:46:12: error: reference to ‘hash’ is ambiguous insert(hash(cuv)); ^ user.cpp:12:5: note: candidates are: int hash(char*) int hash(char v[]) ^ In file included from /usr/include/c++/4.8/bits/stl_bvector.h:1134:0, from /usr/include/c++/4.8/vector:65, 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:50:16: error: reference to ‘hash’ is ambiguous insert(hash(cuv)); ^ user.cpp:12:5: note: candidates are: int hash(char*) int hash(char v[]) ^ In file included from /usr/include/c++/4.8/bits/stl_bvector.h:1134:0, from /usr/include/c++/4.8/vector:65, 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:54:13: error: reference to ‘hash’ is ambiguous int x = hash(cuv),nr_cuv = 0; ^ user.cpp:12:5: note: candidates are: int hash(char*) int hash(char v[]) ^ In file included from /usr/include/c++/4.8/bits/stl_bvector.h:1134:0, from /usr/include/c++/4.8/vector:65, 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:57:26: error: ‘nr_cuv’ was not declared in this scope if(find_hash(x)) nr_cuv++; ^ user.cpp:61:22: error: ‘nr_cuv’ was not declared in this scope if(find_hash(x)) nr_cuv++; ^ user.cpp:63:20: error: ‘nr_cuv’ was not declared in this scope fprintf(g,"%d",nr_cuv); ^ user.cpp:39:21: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] fscanf(f,"%s",s); ^ user.cpp:40:23: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]

Ceva nu functioneaza?