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

immediate exit while loop c++ - Stack Overflow

How do I exit a while loop immediately without going to the end of the block? e.g. while(choice!=99) { cin>>choice; if (choice==99) //exit here and don't get additional inpu... ... Yes, break will work. However, you may find that many programmers prefer n

stackoverflow.com

網址安全性掃描由 google 提供