Problem lunchbox
User jeberechieze
Submission Time 2026-10-28 11:16:01
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:10:22: error: expected ‘)’ before ‘;’ token
10 | while (int count = 0; sum + c[count] <= b; c = c[count+b];) {
| ~ ^
| )
lunchbox.cpp:10:37: error: invalid types ‘int [b][<unresolved overloaded function type>]’ for array subscript
10 | while (int count = 0; sum + c[count] <= b; c = c[count+b];) {
| ^
lunchbox.cpp:10:56: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘int’ to binary ‘operator+’
10 | while (int count = 0; sum + c[count] <= b; c = c[count+b];) {
| ~~~~~^~
lunchbox.cpp:10:60: error: expected primary-expression before ‘)’ token
10 | while (int count = 0; sum + c[count] <= b; c = c[count+b];) {
| ^