Problem lunchbox
User Henries
Submission Time 2024-06-14 22:16:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:7:22: error: expected ‘;’ before ‘)’ token
7 | for (int i=0;i<m<i++){
| ^
| ;
lunchbox.cpp:10:10: error: request for member ‘push_back’ in ‘mylist’, which is of non-class type ‘std::__cxx11::list<int> [m]’
10 | mylist.push_back(a);
| ^~~~~~~~~
lunchbox.cpp:12:12: error: request for member ‘sort’ in ‘mylist’, which is of non-class type ‘std::__cxx11::list<int> [m]’
12 | mylist.sort();
| ^~~~
lunchbox.cpp:15:16: error: ‘myList’ was not declared in this scope; did you mean ‘mylist’?
15 | iterator it = myList.begin();
| ^~~~~~
| mylist