Problem | sumint |
---|---|
User | sporknives |
Submission Time | 2024-05-15 22:05:26 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
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: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,
from /usr/include/c++/9/iostream:39,
from sumint.cpp:1:
/usr/include/c++/9/bits/basic_string.h:1267:7: note: candidate: ‘std::__cxx11::basic_string<_CharT, _Traits, _All