Problem | lengthsort |
---|---|
User | AltheaZ |
Submission Time | 2023-06-30 12:48:21 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
lengthsort.cpp: In function ‘int main()’:
lengthsort.cpp:18:28: error: no matching function for call to ‘std::vector<std::__cxx11::basic_string<char> >::erase(__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type&)’
18 | words.erase(words[maxele]);
| ^
In file included from /usr/include/c++/9/vector:67,
from lengthsort.cpp:2:
/usr/include/c++/9/bits/stl_vector.h:1427:7: note: candidate: ‘std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(std::vector<_Tp, _Alloc>::const_iterator) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >