Problem sort
User Rollsroyce26
Submission Time 2024-06-19 14:38:32
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sort.cpp: In function ‘bool comp(std::string, std::string)’:
sort.cpp:5:19: error: no match for ‘operator!=’ (operand types are ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} and ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’})
5 | if (a.length()!=b length()) return a.length()<b.length();
| ~~~~~~~~~~^~~
| | |
| | std::string {aka std::__cxx11::basic_string<char>}
| std::__cxx11::basic_string<char>::size_type {aka long unsigned int}
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from sort.cpp:1:
/usr/include/c++/9/bits/regex.h:1037:5: note: candidate: ‘template<class _BiIter> bool std::__cxx11::operator!=(const std::__cxx11::sub_match<_BiIter>&, const std::__cxx11::sub_match<_BiIter>&)’
103