C++ Switch Statements/Loop help

 
Last edited on
The do ... while loop does not belong within the getFlight() function. Integrate the switch in the alreaddy existing switch in main.

Add another function like displayFlight() and put the lines 46 to 58 there.

In the main switch the case 'D' would be line case 'E' just with displayFlight().

I don't think that in case 'E' you have to enter all flights. Instead I guess you add or modify a fligth. So add another variable after line 77 like count and set it to 0. In case 'E' and if count < SIZE call obj1[count].getFlight(); and increase count, otherwise display an error.
Topic archived. No new replies allowed.