In C++ it would be:
You have to use a break if you want to leave the switch caseCode:switch (Variable_to_test) { case 'choice_1': { cout<<"Hi"; break; } case 'choice_2': { cout<<"bye"; break; } case 'choice_3': { cout<<"Hi again"; break; }![]()
Results 1 to 10 of 10
Threaded View
- 25 Jun. 2010 03:48pm #10