Problem lunchbox
User ForsakenPBJ
Submission Time 2024-04-01 11:46:58
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:7:2: error: expected initializer before ‘cin’
7 | cin >> N >> m;
| ^~~
lunchbox.cpp:9:10: error: ‘list’ was not declared in this scope
9 | cin >> list[i];
| ^~~~
lunchbox.cpp:2:1: note: ‘std::list’ is defined in header ‘<list>’; did you forget to ‘#include <list>’?
1 | #include <iostream>
+++ |+#include <list>
2 | using namespace std;
lunchbox.cpp:12:7: error: ‘list’ was not declared in this scope
12 | sort(list , list + m);
| ^~~~
lunchbox.cpp:12:7: note: ‘std::list’ is defined in header ‘<list>’; did you forget to ‘#include <list>’?
lunchbox.cpp:12:2: error: ‘sort’ was not declared in this scope; did you mean ‘qsort’?
12 | sort(list , list + m);
| ^~~~
| qsort
lunchbox.cpp:17:3: error: ‘x’ was not declared in this scope
17 | x++
|