Borderou de evaluare (job #1114126)

Utilizator beldeabogdanBogdan Beldea beldeabogdan Data 21 februarie 2014 11:58:36
Problema Potrivirea sirurilor Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int hash(char)’: user.cpp:25:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (q.size() > k) { ^ user.cpp: In function ‘int main()’: user.cpp:51:11: error: reference to ‘hash’ is ambiguous hb[i] = hash(b[i]); ^ user.cpp:23:5: note: candidates are: int hash(char) int hash(char x) { ^ In file included from /usr/local/include/c++/4.8.0/bits/stl_bvector.h:1134:0, from /usr/local/include/c++/4.8.0/vector:65, from /usr/local/include/c++/4.8.0/queue:61, from user.cpp:3: /usr/local/include/c++/4.8.0/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash struct hash; ^ user.cpp:53:30: error: reference to ‘hash’ is ambiguous for (int i=1;i<=k;i++) ha = hash(k); ^ user.cpp:23:5: note: candidates are: int hash(char) int hash(char x) { ^ In file included from /usr/local/include/c++/4.8.0/bits/stl_bvector.h:1134:0, from /usr/local/include/c++/4.8.0/vector:65, from /usr/local/include/c++/4.8.0/queue:61, from user.cpp:3: /usr/local/include/c++/4.8.0/bits/functional_hash.h:58:12: note: template<class _Tp> struct std::hash struct hash; ^

Ceva nu functioneaza?