Problem | lengthsort |
---|---|
User | PlayVoltz |
Submission Time | 2023-04-29 21:30:52 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
lengthsort.cpp: In function ‘bool compareFunction(std::string, std::string)’:
lengthsort.cpp:4:69: error: ‘std::string’ {aka ‘class std::__cxx11::basic_string<char>’} has no member named ‘second’
4 | bool compareFunction (std::string abc, std::string bcs) {return abc.second<bcs.second;}
| ^~~~~~
lengthsort.cpp:4:80: error: ‘std::string’ {aka ‘class std::__cxx11::basic_string<char>’} has no member named ‘second’
4 | bool compareFunction (std::string abc, std::string bcs) {return abc.second<bcs.second;}
| ^~~~~~
lengthsort.cpp: In function ‘int main()’:
lengthsort.cpp:15:30: error: no matching function for call to ‘end()’
15 | sort(vect.begin(), vect,end(), compareFunction)
| ^
In file included from /usr/include/c++/9/bits/range_access