I want to jump from the middle of a switch
statement, to the loop statement in the following code:
while (something = get_something())
{
switch (something)
{
case A:
case B:
break;
default:
// get another something and try again
continue;
}
// do something for a handled something
do_something();
}
Is this a valid way to use continue
? Are continue
statements ignored by switch
statements? Do C and C++ differ on their behaviour here?