After doing some reseach on how to break through a secondary loop
while (true) { // Main Loop
for (int I = 0; I < 15; I++) { // Secondary loop
// Do Something
break; // Break main loop?
}
}
most people recommended to call the 'goto' function
Looking as the following example:
while (true) { // Main Loop
for (int I = 0; I < 15; I++) { // Secondary Loop
// Do Something
goto ContinueOn; // Breaks the main loop
}
}
ContinueOn:
However; I have often heard that the 'goto' statement is bad practice. The picture below is perfectly illustrating my point:

So
- How bad is the goto statement really, and why?
- Is there a more effective way to break the main loop than using the 'goto' statement?