Problem lengthsort
User PrunJuice
Submission Time 2024-03-28 09:43:13
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lengthsort.cpp: In function ‘bool compare(const string&, const string&)’:
lengthsort.cpp:4:11: error: ‘const string’ {aka ‘const class std::__cxx11::basic_string<char>’} has no member named ‘first’
4 | if (a.first.length() == b.first.length()) {
| ^~~~~
lengthsort.cpp:4:31: error: ‘const string’ {aka ‘const class std::__cxx11::basic_string<char>’} has no member named ‘first’
4 | if (a.first.length() == b.first.length()) {
| ^~~~~
lengthsort.cpp:5:18: error: ‘const string’ {aka ‘const class std::__cxx11::basic_string<char>’} has no member named ‘second’
5 | return a.second < b.second;
| ^~~~~~
lengthsort.cpp:5:29: error: ‘const string’ {aka ‘const class std::__cxx11::basic_string<char>’} has no member named ‘second’
5 | return a.second < b.second;
| ^~~~~~