How to properly use if , if else statement in a switch?

Sep 28, 2014 at 7:22am
PLEASE CLOSE :)
Last edited on Oct 1, 2014 at 6:38am
Sep 28, 2014 at 9:28am
I think this is because you haven't told the program to pause. All of the code executes but as soon as it finishes the program closes down.

To make things easier you could add "cin.ignore()" after every time you input something. Then, when you want to pause the program you use the same again and then it should now pause and your code will work.
Sep 28, 2014 at 10:34am
You have break statements on lines 76 and 133. These are unconditionally executed, so the code following those break statements and before the next case are never executed (and may as well not exist.)
Sep 30, 2014 at 5:03am
Thank you Tom56785 & cire for you input.

Sadly, my professor informed me that for the mean while, i'm not allowed to use switch & case.

She wants me to only use IF statements for now.
Topic archived. No new replies allowed.