Line 16: That's not the correct syntax for a
switch
statement.
Not sure what you're trying to do here. Perhaps something like this:
1 2 3 4 5 6 7 8 9
|
switch (a)
{
case 1: cout << "January";
break;
case 2: cout << "February";
break;
// etc
}
|
Line 19: As pointed out previously
num = "January"
makes no sense. You can;t assign a quoted string to an int.
Line 23: Not sure what this
while
is supposed to be doing. It looks like you might have intended a do/while loop, but there is no do for the while. If this was intended as the top of a while loop, this will case an infinite loop which does nothing. The semicolon terminates the loop. The condition in the while statement is also incorrect. You're using the assignment operator (=), not the equality operator (==).
Line 25-26: What are these braces for?
Line 41: This } terminates main. Lines 42-43 are outside main.
Line 32: This line does nothing. Did you intended a functioncall? If so, you need ().