我想从switch语句的中间跳转到以下代码中的循环语句:
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();
}
Run Code Online (Sandbox Code Playgroud)
这是一种有效的使用方式continue吗?continue语句是否忽略了switch语句?C和C++在这方面的行为有何不同?