Problem sumint
User AdwinLau
Submission Time 2024-04-05 16:15:11
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sumint.cpp: In function ‘int main()’:
sumint.cpp:14:24: error: cannot convert ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} to ‘char*’
14 | char *token = strtok(input, " ");
| ^~~~~
| |
| std::string {aka std::__cxx11::basic_string<char>}
sumint.cpp:10:22: note: initializing argument 1 of ‘char* strtok(char*, const char*)’
10 | char *strtok(char *str, const char *delim);
| ~~~~~~^~~