Array boolean help

Hello I am new to c++ programming and know of the basics but i would ask for some advice on this matter. I know about arrays but i am not sure about boolean arrays.

Lets say i have declared two arrays

one array of 5 valaues representing 5 burgers

another array of 5 hot dogs

The purpose of the program is to record when a burger or hot dog is eaten when the user is promted for example, Do you want to eat burger 1?

answer yes or no.

If the answer is yes the burger is counted as eaten so this is ture,

if no the burger is left and moves down the array to burger 2 and so forth.

If all burgers have been eaten and the progam will promt the user if they want a hot dog as all burgers have been eaten.

So how do i enable the program to do this.

I just got this so far any help given i will be very greatfull

bool burger[5]
int i=1;
for (int i = 1; i >= 5; i++)
burger [i] = 1;
Last edited on
Why burger1 , burger2 ...etc.
you can do it in another way also .
not using array but just burger count and hot dog count ... and by increamenting the count .
Topic archived. No new replies allowed.