Borderou de evaluare (job #1799798)
Utilizator | Heidelbacher Andrei a_h1926 | Data | 6 noiembrie 2016 20:06:33 |
---|---|---|---|
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::erase(int)’:
user.cpp:19:31: error: no matching function for call to ‘std::vector<int>::erase(std::vector<int>::const_iterator)’
table[key].erase(find(value));
^
user.cpp:19:31: 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 ‘std::vector<int>::const_iterator {aka __gnu_cxx::__normal_iterator<const int*, std::vector<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 ‘std::vector<int>::const_iterator Hash::find(int) const’:
user.cpp:39:21: error: ‘key’ was not declared in this scope
return find(table[key].begin(), table[key].end(), value);
^
user.cpp: In function ‘int main()’:
user.cpp:48:14: error: expected initializer before string constant
ofstream out"(hashuri.out");
^
user.cpp:60:4: error: ‘out’ was not declared in this scope
out << (hash.contains(x) ? 1 : 0) << "\n";
^
user.cpp:64:2: error: ‘out’ was not declared in this scope
out.close();
^
user.cpp: In member function ‘std::vector<int>::const_iterator Hash::find(int) const’:
user.cpp:40:2: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !