Problem addition
User iso6ky
Submission Time 2024-05-15 13:13:21
Score 0
Max Time N/A
Max Memory N/A

Compile Error

addition.cpp:5:1: error: ‘vector’ does not name a type
5 | vector<string> numbers;
| ^~~~~~
addition.cpp:8:8: error: expected constructor, destructor, or type conversion before ‘(’ token
8 | getline(cin , str);
| ^
addition.cpp:9:20: error: variable ‘std::stringstream ss’ has initializer but incomplete type
9 | stringstream ss(str);
| ^
addition.cpp:11:1: error: expected unqualified-id before ‘while’
11 | while (getline(ss , number, ' ')) {numbers.push_back(numeber);}
| ^~~~~
addition.cpp:12:16: error: ‘numbers’ was not declared in this scope; did you mean ‘number’?
12 | int sum = stoi(numbers[0]) + stoi(numbers[1]);
| ^~~~~~~
| number
addition.cpp:12:35: error: ‘numbers’ was not declared in this scope; did you mean ‘number’?
12 | int sum = stoi(numbers[0]) + stoi(numbers[1]);
|