Problem lunchbox
User ToiletBrIcker
Submission Time 2024-06-18 11:24:13
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:5:7: error: ‘cin’ is not a member of ‘std’
5 | std::cin << boxes << peeps;
| ^~~
lunchbox.cpp:1:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
+++ |+#include <iostream>
1 | int main(){
lunchbox.cpp:8:8: error: ‘cin’ is not a member of ‘std’
8 | std::cin >> arr[i];
| ^~~
lunchbox.cpp:8:8: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
lunchbox.cpp:11:7: error: ‘sort’ is not a member of ‘std’
11 | std::sort(arr, arr + sizeof(arr)/ sizeof(arr[0]));
| ^~~~
lunchbox.cpp:12:8: error: expected ‘(’ before ‘true’
12 | while true{
| ^~~~
| (
lunchbox.cpp:12:12: error: expected ‘)’ before ‘{’ token
12 | while true{
| ~~~~^
|