Problem sort
User RandomPerson
Submission Time 2023-03-09 13:38:40
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sort.cpp: In function ‘int main()’:
sort.cpp:9:12: error: cannot convert ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} to ‘const char*’
9 | a[i]=atoi(s);
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/features.h:461,
from /usr/include/x86_64-linux-gnu/c++/9/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/c++config.h:528,
from /usr/include/c++/9/cassert:43,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:33,
from sort.cpp:1:
/usr/include/stdlib.h:361:1: note: initializing argument 1 of ‘int atoi(const char*)’
361 | __NTH (atoi (const char *__nptr))
| ^~~~~
sort.cpp:13:21: error: no matching function for call to ‘std::__cxx11::basic_string<char>::basic_string(__int128&)’
13 | cout <&l