Problem | lengthsort |
---|---|
User | 12345 |
Submission Time | 2025-04-12 09:29:40 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
lengthsort.cpp: In function ‘bool cmp(std::string, std::string)’:
lengthsort.cpp:7:14: error: invalid use of member function ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]’ (did you forget the ‘()’ ?)
7 | return a.length > b.length;
| ~~^~~~~~
| ()
lengthsort.cpp:7:25: error: invalid use of member function ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]’ (did y