我想从语句中间跳转到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();
}
这是一种有效的使用方式continue吗?语句是否被continue语句忽略switch?C 和 C++ 在这里的行为是否不同?