0

I am doing a program in C++ with do while loops and switch case. After the user enters the info required, the program automatically does the while part. It is not ejecuting the switch case (most important part in my program). What can I do?

2
Contributors
1
Reply
2
Views
14 Years
Discussion Span
Last Post by Dani
0

Can you show us your code so that we can see if there are any errors?
A switch statement should be in the following form:

switch (variable)
{
	 case expression1: { statement1; break; }
	 case expression2: { statement2; break; }
	 ...
	 default: { defaultstatement; }
}
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.