You need another break; statment at the end of each outer switch block, before the next case statement, as in (from lines 46-48):
}
break;
case 2://Not Enough Heat
cout<<"What type of Heating system do you have?\n"<<endl;
plus breaks for the others.
rubberman
Posting Maven
2,587 posts since Mar 2010
Reputation Points: 365
Solved Threads: 308
Skill Endorsements: 52
cases 1, 2, 3, 4 and 5 need a break at the end of them before the start of the next case.
NathanOliver
Posting Virtuoso
1,516 posts since Apr 2009
Reputation Points: 281
Solved Threads: 278
Skill Endorsements: 3
I was reading somewhere in a forum that using switch case to do file handling was unstable.
That's nonsensical. Nothing about a switch or "file handling" in general discourages stability. It's certainly possible to write brittle code, but that's a problem with the programmer, not the constructs being used.
So I'd say that whoever wrote what you were reading either meant something else, or was quite confused.
deceptikon
Challenge Accepted
3,460 posts since Jan 2012
Reputation Points: 822
Solved Threads: 474
Skill Endorsements: 57