How to break out of nested loops?

No, don’t spoil the fun with a break. This is the last remaining valid use of goto 😉 If not this then you could use flags to break out of deep nested loops. Another approach to breaking out of a nested loop is to factor out both loops into a separate function, and return from … Read more