| Problem | sumofdigits |
|---|---|
| User | AaravRastogi |
| Submission Time | 2025-12-29 11:13:17 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
sumofdigits.cpp: In function ‘int main()’:
sumofdigits.cpp:7:37: error: expected ‘)’ before ‘{’ token
7 | for (int i = 0 ; i < s.size() ; ++i{
| ~ ^
| )
sumofdigits.cpp:8:3: error: ‘t’ was not declared in this scope
8 | t += stoi(s[i]);
| ^
sumofdigits.cpp:8:17: error: no matching function for call to ‘stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)’
8 | t += stoi(s[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/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,