Problem sumint
User sporknives
Submission Time 2024-05-15 22:04:55
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sumint.cpp: In function ‘int main()’:
sumint.cpp:16:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
16 | if (numlist[i] == " ") {
| ^~~
sumint.cpp:18:19: error: expected ‘;’ before ‘}’ token
18 | currentnum = ""
| ^
| ;
19 | }
| ~
sumint.cpp:21:32: error: no matching function for call to ‘std::__cxx11::basic_string<char>::append(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)’
21 | currentnum.append(numlist[i]);
| ^
In file included from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,