Problem lunchbox
User Dana
Submission Time 2023-11-09 11:06:27
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int32_t main()’:
lunchbox.cpp:8:13: error: ‘i’ was not declared in this scope
8 | cin >> arr[i];
| ^
lunchbox.cpp: At global scope:
lunchbox.cpp:10:6: error: expected constructor, destructor, or type conversion before ‘(’ token
10 | sort (arr, arr + m);
| ^
lunchbox.cpp:12:1: error: expected unqualified-id before ‘for’
12 | for (int i = 0; i < m; ++i){
| ^~~
lunchbox.cpp:12:17: error: ‘i’ does not name a type
12 | for (int i = 0; i < m; ++i){
| ^
lunchbox.cpp:12:24: error: expected unqualified-id before ‘++’ token
12 | for (int i = 0; i < m; ++i){
| ^~
lunchbox.cpp:18:1: error: ‘cout’ does not name a type
18 | cout << school;
| ^~~~
lunchbox.cpp:19:1: error: expected unqualified-id before ‘return’
19 | return 0;
| ^~~~~~
lunchbox.cpp:20:1: error: expec