Problem sort
User Soysauce
Submission Time 2024-04-25 15:51:48
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sort.cpp: In function ‘bool cmp(std::string, std::string)’:
sort.cpp:7:13: 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 | if (a.length == b.length)
| ~~^~~~~~
| ()
sort.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 you forget the ‘()’ ?)