| Problem | sort |
|---|---|
| User | duck |
| Submission Time | 2024-12-22 12:32:43 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
sort.cpp: In function ‘long long int comp(std::string, std::string)’:
sort.cpp:6:20: error: cannot convert ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} to ‘const char*’
6 | else return strcmp(a,b)<0;
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/9/cstring:42,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:48,
from sort.cpp:1:
/usr/include/string.h:137:32: note: initializing argument 1 of ‘int strcmp(const char*, const char*)’
137 | extern int strcmp (const char *__s1, const char *__s2)
| ~~~~~~~~~~~~^~~~