Problem flamethrower
User bobthebill1
Submission Time 2022-12-26 08:30:48
Score 0
Max Time N/A
Max Memory N/A

Compile Error

flamethrower.cpp: In function ‘int main()’:
flamethrower.cpp:7:8: error: ‘vector’ is not a member of ‘std’
7 | std::vector<int> costs(n);
| ^~~~~~
flamethrower.cpp:2:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
1 | #include <iostream>
+++ |+#include <vector>
2 |
flamethrower.cpp:7:15: error: expected primary-expression before ‘int’
7 | std::vector<int> costs(n);
| ^~~
flamethrower.cpp:9:17: error: ‘costs’ was not declared in this scope
9 | std::cin >> costs[i];
| ^~~~~
flamethrower.cpp:16:15: error: ‘costs’ was not declared in this scope; did you mean ‘cost’?
16 | cost += costs[j];
| ^~~~~
| cost