經安全檢測,此網站為安全網站,請放心前往原始網址!

c++ - How to break out of a loop from inside a switch? - Stack Overflow

I'm writing some code that looks like this: while(true) { switch(msg->state) { case MSGTYPE: // ... break; // ... more stuff ... case DONE: break; // **HERE, I want to break out of the loop itself** } } Is there any direct way to do that?

stackoverflow.com

網址安全性掃描由 google 提供