Problem lunchbox
User YEethui
Submission Time 2023-10-07 11:08:19
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:7:5: error: ‘vector’ was not declared in this scope
7 | vector<int> lunchbox;
| ^~~~~~
lunchbox.cpp:2:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
1 | #include <iostream>
+++ |+#include <vector>
2 | using namespace std;
lunchbox.cpp:7:12: error: expected primary-expression before ‘int’
7 | vector<int> lunchbox;
| ^~~
lunchbox.cpp:11:9: error: ‘lunchbox’ was not declared in this scope
11 | lunchbox.push_back(a);
| ^~~~~~~~
lunchbox.cpp:13:10: error: ‘lunchbox’ was not declared in this scope
13 | sort(lunchbox.begin(), lunchbox.end());
| ^~~~~~~~
lunchbox.cpp:13:5: error: ‘sort’ was not declared in this scope; did you mean ‘qsort’?
13 | sort(lunchbox.begin(), lunchbox.end());
| ^~