Borderou de evaluare (job #1277291)

Utilizator PetreCatalinFMI Petre Catalin PetreCatalin Data 27 noiembrie 2014 15:25:58
Problema Criptare2 Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int cautare(std::vector<long int>*, long long int)’: user.cpp:18:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i=0;i<hash[rand].size();++i) ^ user.cpp: In function ‘int main()’: user.cpp:31:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (j=0;j<=strlen(s)-1;++j) { ^ user.cpp:40:9: error: reference to ‘hash’ is ambiguous hash[x%PRIM].push_back(x); ^ user.cpp:8:15: note: candidates are: std::vector<long int> hash [11180] vector <long> hash[11180]; ^ 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:49:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (j=0;j<=strlen(s)-1;++j) { ^ user.cpp:61:20: error: reference to ‘hash’ is ambiguous nr=cautare(hash,x); ^ user.cpp:8:15: note: candidates are: std::vector<long int> hash [11180] vector <long> hash[11180]; ^ 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; ^

Ceva nu functioneaza?