Problem lengthsort
User mingging1748
Submission Time 2024-10-31 21:50:42
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lengthsort.cpp:5:66: error: template argument 2 is invalid
5 | bool compare(const pair<string, int> &a, const pair<string, int &b) {
| ^
lengthsort.cpp:5:66: error: template argument 2 is invalid
lengthsort.cpp:5:66: error: template argument 2 is invalid
lengthsort.cpp:5:66: error: template argument 2 is invalid
lengthsort.cpp:5:48: error: invalid template-id
5 | bool compare(const pair<string, int> &a, const pair<string, int &b) {
| ^~~~
lengthsort.cpp:5:61: error: expected primary-expression before ‘int’
5 | bool compare(const pair<string, int> &a, const pair<string, int &b) {
| ^~~
lengthsort.cpp:5:61: error: expected ‘>’ before ‘int’
lengthsort.cpp:5:66: error: ‘auto’ parameter not permitted in this context
5