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

Compile Error

sort.cpp: In function ‘bool cmp(std::string, std::string)’:
sort.cpp:6:19: error: expected primary-expression before ‘!=’ token
6 | if(a.length(!=b.length()){
| ^~
sort.cpp:6:32: error: expected ‘)’ before ‘{’ token
6 | if(a.length(!=b.length()){
| ~ ^
| )
sort.cpp:11:4: error: expected primary-expression before ‘}’ token
11 | }
| ^
sort.cpp: At global scope:
sort.cpp:12:1: error: expected unqualified-id before ‘else’
12 | else{
| ^~~~
sort.cpp:15:1: error: expected declaration before ‘}’ token
15 | }
| ^
sort.cpp: In function ‘int main()’:
sort.cpp:17:6: error: ‘a’ was not declared in this scope
17 | Sort(a,a+n,cmp);
| ^
sort.cpp:17:10: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
17 | Sort(a,a+n,cmp);
| ^
|