Problem sumint
User gordonlu
Submission Time 2023-09-04 13:52:06
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sumint.cpp: In function ‘int main()’:
sumint.cpp:13:2: error: ‘vector’ was not declared in this scope
13 | vector<int> vect = {};
| ^~~~~~
sumint.cpp:2:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
1 | #include <iostream>
+++ |+#include <vector>
2 |
sumint.cpp:13:9: error: expected primary-expression before ‘int’
13 | vector<int> vect = {};
| ^~~
sumint.cpp:17:4: error: ‘vect’ was not declared in this scope
17 | vect.push_back(stoi(temp));
| ^~~~
sumint.cpp:25:22: error: ‘vect’ was not declared in this scope
25 | for (int i = 0; i < vect.size(); i++) {
| ^~~~