Problem lunchbox
User rheau140030
Submission Time 2023-11-23 12:00:23
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In lambda function:
lunchbox.cpp:8:13: error: expected ‘{’ before ‘;’ token
8 | int arr = [];
| ^
lunchbox.cpp: At global scope:
lunchbox.cpp:8:13: error: invalid user-defined conversion from ‘<lambda()>’ to ‘int’ [-fpermissive]
lunchbox.cpp:8:11: note: candidate is: ‘constexpr<lambda()>::operator void (*)()() const’ <near match>
8 | int arr = [];
| ^
lunchbox.cpp:8:11: note: no known conversion from ‘void (*)()’ to ‘int’
lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:12:21: error: invalid types ‘int[int]’ for array subscript
12 | int min_num = arr[k];
| ^
lunchbox.cpp:14:11: error: invalid types ‘int[int]’ for array subscript
14 | if (arr[i] < arr[minn_idx])
| ^
lunchbox.cpp:14:19: error: ‘minn_idx’ was not declared in this scope
14 | if (arr[i] < arr[minn_idx])
| ^