Problem lunchbox
User KingKian
Submission Time 2023-09-14 08:33:50
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:21:30: error: invalid types ‘int[int]’ for array subscript
21 | if (schoolboxwanted[i] + schoolboxwanted[i + 1] + schoolboxwanted[i + 2] <= lunchbox)
| ^
lunchbox.cpp:21:55: error: invalid types ‘int[int]’ for array subscript
21 | if (schoolboxwanted[i] + schoolboxwanted[i + 1] + schoolboxwanted[i + 2] <= lunchbox)
| ^
lunchbox.cpp:21:80: error: invalid types ‘int[int]’ for array subscript
21 | if (schoolboxwanted[i] + schoolboxwanted[i + 1] + schoolboxwanted[i + 2] <= lunchbox)
| ^
lunchbox.cpp:27:10: error: no match for ‘operator>>’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘int’)
27 | cout >> numschool;
| ~~~~ ^~ ~