Problem | lengthsort |
---|---|
User | dev1634 |
Submission Time | 2023-03-09 08:43:04 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
lengthsort.cpp: In function ‘int main()’:
lengthsort.cpp:13:15: error: ‘std::string’ {aka ‘class std::__cxx11::basic_string<char>’} has no member named ‘len’
13 | size = name.len();
| ^~~
lengthsort.cpp:14:20: error: class template argument deduction failed:
14 | multimap[size] = name;
| ^~~~
lengthsort.cpp:14:20: error: no matching function for call to ‘multimap(std::string&)’
In file included from /usr/include/c++/9/map:62,
from lengthsort.cpp:2:
/usr/include/c++/9/bits/stl_multimap.h:1080:5: note: candidate: ‘template<class _InputIterator, class _Compare, class _Allocator, class, class, class> std::multimap(_InputIterator, _InputIterator, _Compare, _Allocator)-> std::multimap<typename std::remove_const<typename std::iterator_traits<_Iterator>::value_type::first_type>::type, typename std::iterator_traits<_Iterator>::value_type::second_type, _Compar