DDCODE

Share programming skills from Magic Oriental

upArrow

Can double-layer loop nesting continue the outer layer on the inner layer

 May 9, 2019   c++, question

If I use break or continue in the inner nesting, it will only affect the inner loop. How do I use the inner statement? It acts on the circulation of the outer layer.

flag bit

for (...) {
 bool breakOuter = false;
 for (...) {
 //  ...
 breakOuter = true;
 break;
 }
 if (breakOuter) break;
 }

Related Posts:

  • All nesting cannot guarantee the order of…
  • C nested loop, inner loop executed only once?
  • A simple java anonymous inner class, how to refer to…
  • The parameters passed in from the anonymous inner…
  • A simple java anonymous inner class, how to refer to…
  • The inner code block defines a variable with the…
  • If there are too many levels of nesting in the…
  • Scanf in while, why can't the loop continue when…
  • In the case of C language topic, for loop nesting,…
<< Why does the compilation pass but the program stops automatically when it is executed? Implementation of Sequence Table Class Function Why does this function not run? >>

Related Posts:

  • All nesting cannot guarantee the order of…
  • C nested loop, inner loop executed only once?
  • A simple java anonymous inner class, how to refer to…
  • The parameters passed in from the anonymous inner…
  • A simple java anonymous inner class, how to refer to…
  • The inner code block defines a variable with the…
  • If there are too many levels of nesting in the…
  • Scanf in while, why can't the loop continue when…
  • In the case of C language topic, for loop nesting,…

Tags

Android android-studio apache c c++ centos Css css3 Database Docker Eclipse Express Front end git GitHub golang Html html5 Ios java javascript Jquery Laravel linux macos mongodb mysql Nginx node.js npm objective-c php Programmer python redis ruby shell Spring Sql Swift ubuntu vim vue.js Web xcode

Powered by MyWiki WordPress Theme