Problem sumint
User iso6ky
Submission Time 2024-05-15 11:53:30
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sumint.cpp: In function ‘int main()’:
sumint.cpp:12:9: error: conflicting declaration ‘std::string tokens’
12 | string tokens;
| ^~~~~~
sumint.cpp:11:17: note: previous declaration as ‘std::vector<std::__cxx11::basic_string<char> > tokens’
11 | vector<string> tokens(N);
| ^~~~~~
sumint.cpp:13:18: error: ‘str’ was not declared in this scope; did you mean ‘std’?
13 | stringstream ss(str);
| ^~~
| std
sumint.cpp:14:22: error: ‘token’ was not declared in this scope; did you mean ‘tokens’?
14 | while (getline(ss , token , ' ')) {
| ^~~~~
| tokens
sumint.cpp:15:10: error: ‘class std::vector<std::__cxx11::basic_string<char> >’ has no member named ‘pushback’; did you mean ‘push_back’?
15 | tokens.pushback(token);
| ^~~~~~~~
| p