Borderou de evaluare (job #1337600)

Utilizator cautionPopescu Teodor caution Data 9 februarie 2015 11:43:58
Problema Hashuri Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘std::list<long int>::iterator search(long int)’: user.cpp:15:33: error: reference to ‘hash’ is ambiguous for(list<long>::iterator it=hash[h_x].begin(), end=hash[h_x].end(); it!=end; ++it) ^ user.cpp:6:12: note: candidates are: std::list<long int> hash [666013] list<long> hash[MOD]; ^ 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:15:75: error: no match for ‘operator!=’ (operand types are ‘std::list<long int>::iterator {aka std::_List_iterator<long int>}’ and ‘<unresolved overloaded function type>’) for(list<long>::iterator it=hash[h_x].begin(), end=hash[h_x].end(); it!=end; ++it) ^ user.cpp:15:75: note: candidates are: In file included from /usr/include/c++/4.8/list:63:0, from user.cpp:3: /usr/include/c++/4.8/bits/stl_list.h:187:7: note: bool std::_List_iterator<_Tp>::operator!=(const _Self&) const [with _Tp = long int; std::_List_iterator<_Tp>::_Self = std::_List_iterator<long int>] operator!=(const _Self& __x) const ^ /usr/include/c++/4.8/bits/stl_list.h:187:7: note: no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘const _Self& {aka const std::_List_iterator<long int>&}’ In file included from /usr/include/c++/4.8/iosfwd:40:0, from /usr/include/c++/4.8/ios:38, 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/postypes.h:221:5: note: template<class _StateT> bool std::operator!=(const std::fpos<_StateT>&, const std::fpos<_StateT>&) operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) ^ /usr/include/c++/4.8/bits/postypes.h:221:5: note: template argument deduction/substitution failed: user.cpp:15:77: note: ‘std::list<long int>::iterator {aka std::_List_iterator<long int>}’ is not derived from ‘const std::fpos<_StateT>’ for(list<long>::iterator it=hash[h_x].begin(), end=hash[h_x].end(); it!=end; ++it) ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, 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/stl_pair.h:227:5: note: template<class _T1, class _T2> constexpr bool std::operator!=(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&) operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) ^ /usr/include/c++/4.8/bits/stl_pair.h:227:5: note: template argument deduction/substitution failed:

Ceva nu functioneaza?