Questions tagged «continue»






7
在switch语句中使用Continue
我想从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 ++的行为是否有所不同?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.