Problem | lengthsort |
---|---|
User | godex |
Submission Time | 2025-03-05 17:48:44 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
lengthsort.cpp: In function ‘long long int comp(std::string, std::string)’:
lengthsort.cpp:6:5: error: named return values are no longer supported
6 | return a.lenth() > b.length();
| ^~~~~~
lengthsort.cpp:9:9: error: declaration of ‘long long int a’ shadows a parameter
9 | int a; cin >> a;
| ^
lengthsort.cpp:14:18: error: ‘i’ was not declared in this scope
14 | sort (a, a + i, comp);
| ^
lengthsort.cpp:16:10: error: no match for ‘operator>>’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’})
16 | cout >> n[i] >> endl;
| ~~~~ ^~ ~~~~
| | |
| | std::string {aka std::__cxx11::basic_string<char>}
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/x86_64-l