Borderou de evaluare (job #2663522)

Utilizator cristiemanuelstroe cristian emanuel cristiemanuel Data 26 octombrie 2020 17:34:50
Problema Hashuri Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:35:23: error: no matching function for call to 'std::vector<int>::erase(int&)' H[h].erase(*it); ^ In file included from /usr/include/c++/6/vector:64:0, from main.cpp:3: /usr/include/c++/6/bits/stl_vector.h:1147:7: note: candidate: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(std::vector<_Tp, _Alloc>::const_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*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const int*, std::vector<int> >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const int*] erase(const_iterator __position) ^~~~~ /usr/include/c++/6/bits/stl_vector.h:1147:7: note: no known conversion for argument 1 from 'int' to 'std::vector<int>::const_iterator {aka __gnu_cxx::__normal_iterator<const int*, std::vector<int> >}' /usr/include/c++/6/bits/stl_vector.h:1174:7: note: candidate: std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(std::vector<_Tp, _Alloc>::const_iterator, std::vector<_Tp, _Alloc>::const_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*; std::vector<_Tp, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const int*, std::vector<int> >; typename __gnu_cxx::__alloc_traits<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type>::const_pointer = const int*] erase(const_iterator __first, const_iterator __last) ^~~~~ /usr/include/c++/6/bits/stl_vector.h:1174:7: note: candidate expects 2 arguments, 1 provided Non zero exit status: 1

Ceva nu functioneaza?