Borderou de evaluare (job #1799793)

Utilizator a_h1926Heidelbacher Andrei a_h1926 Data 6 noiembrie 2016 20:01:44
Problema Hashuri Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In member function ‘void Hash::insert(int)’: user.cpp:10:18: error: ‘class std::vector<int>’ has no member named ‘find’ if (table[key].find(value) == table[key].end()) { ^ user.cpp: In member function ‘void Hash::erase(int)’: user.cpp:18:25: error: no matching function for call to ‘std::vector<int>::erase(const int&)’ table[key].erase(value); ^ user.cpp:18:25: note: candidates are: In file included from /usr/include/c++/4.8/vector:69:0, from user.cpp:2: /usr/include/c++/4.8/bits/vector.tcc:134:5: note: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(std::vector<_Tp, _Alloc>::iterator) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = int*] vector<_Tp, _Alloc>:: ^ /usr/include/c++/4.8/bits/vector.tcc:134:5: note: no known conversion for argument 1 from ‘const int’ to ‘std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}’ /usr/include/c++/4.8/bits/vector.tcc:146:5: note: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(std::vector<_Tp, _Alloc>::iterator, std::vector<_Tp, _Alloc>::iterator) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; typename std::_Vector_base<_Tp, _Alloc>::pointer = int*] vector<_Tp, _Alloc>:: ^ /usr/include/c++/4.8/bits/vector.tcc:146:5: note: candidate expects 2 arguments, 1 provided user.cpp: In member function ‘bool Hash::contains(int) const’: user.cpp:24:21: error: ‘const class std::vector<int>’ has no member named ‘find’ return table[key].find(value) != table[key].end(); ^ user.cpp: In function ‘int main()’: user.cpp:42:14: error: expected initializer before string constant ofstream out"(hashuri.out"); ^ user.cpp:54:4: error: ‘out’ was not declared in this scope out << (hash.contains(x) ? 1 : 0) << "\n"; ^ user.cpp:58:2: error: ‘out’ was not declared in this scope out.close(); ^

Ceva nu functioneaza?