Borderou de evaluare (job #2287074)
Utilizator | Data | 21 noiembrie 2018 14:48:34 | |
---|---|---|---|
Problema | Lupul Urias si Rau | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:40:35: error: no matching function for call to 'std::set<int>::erase(std::set<int>::reverse_iterator)'
Q.erase(Q.rbegin());
^
In file included from /usr/include/c++/6/set:61:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:87,
from main.cpp:1:
/usr/include/c++/6/bits/stl_set.h:571:7: note: candidate: std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::erase(std::set<_Key, _Compare, _Alloc>::const_iterator) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<int>; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<int>]
erase(const_iterator __position)
^~~~~
/usr/include/c++/6/bits/stl_set.h:571:7: note: no known conversion for argument 1 from 'std::set<int>::reverse_iterator {aka std::reverse_iterator<std::_Rb_tree_const_iterator<int> >}' to 'std::set<int>::const_iterator {aka std::_Rb_tree_const_iterator<int>}'
/usr/include/c++/6/bits/stl_set.h:601:7: note: candidate: std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::erase(const key_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; std::set<_Key, _Compare, _Alloc>::size_type = long unsigned int; std::set<_Key, _Compare, _Alloc>::key_type = int]
erase(const key_type& __x)
^~~~~
/usr/include/c++/6/bits/stl_set.h:601:7: note: no known conversion for argument 1 from 'std::set<int>::reverse_iterator {aka std::reverse_iterator<std::_Rb_tree_const_iterator<int> >}' to 'const key_type& {aka const int&}'
/usr/include/c++/6/bits/stl_set.h:623:7: note: candidate: std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::erase(std::set<_Key, _Compare, _Alloc>::const_iterator, std::set<_Key, _Compare, _Alloc>::const_iterator) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<int>; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<int>]
erase(const_iterator __first, const_iterator __last)
^~~~~
/usr/include/c++/6/bits/stl_set.h:623:7: note: candidate expects 2 arguments, 1 provided
main.cpp:43:31: error: no matching function for call to 'std::set<int>::erase(std::set<int>::reverse_iterator)'
Q.erase(Q.rbegin());
^
In file included from /usr/include/c++/6/set:61:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:87,
from main.cpp:1:
/usr/include/c++/6/bits/stl_set.h:571:7: note: candidate: std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::erase(std::set<_Key, _Compare, _Alloc>::const_iterator) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<int>; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<int>]
erase(const_iterator __position)
^~~~~
/usr/include/c++/6/bits/stl_set.h:571:7: note: no known conversion for argument 1 from 'std::set<int>::reverse_iterator {aka std::reverse_iterator<std::_Rb_tree_const_iterator<int> >}' to 'std::set<int>::const_iterator {aka std::_Rb_tree_const_iterator<int>}'
/usr/include/c++/6/bits/stl_set.h:601:7: note: candidate: std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::erase(const key_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; std::set<_Key, _Compare, _Alloc>::size_type = long unsigned int; std::set<_Key, _Compare, _Alloc>::key_type = int]
erase(const key_type& __x)
^~~~~
/usr/include/c++/6/bits/stl_set.h:601:7: note: no known conversion for argument 1 from 'std::set<int>::reverse_iterator {aka std::reverse_iterator<std::_Rb_tree_const_iterator<int> >}' to 'const key_type& {aka const int&}'
/usr/include/c++/6/bits/stl_set.h:623:7: note: candidate: std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::erase(std::set<_Key, _Compare, _Alloc>::const_iterator, std::set<_Key, _Compare, _Alloc>::const_iterator) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<int>; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<int>]
erase(const_iterator __first, const_iterator __last)
^~~~~
/usr/include/c++/6/bits/stl_set.h:623:7: note: candidate expects 2 arguments, 1 provided
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !