Answers for "how to break out two for loops c++"

C++
0

how to break out two for loops c++

for (int i = 0; i < n1; ++i) {
    [&] {
      for (int j = 0; j < n2; ++j) {
        for (int k = 0; k < n3; ++k) {
          return; // yay we're breaking out of 2 loops here
        }
      }
    }();
  }
Posted by: Guest on November-27-2020

Code answers related to "how to break out two for loops c++"

Browse Popular Code Answers by Language