Can someone tell me how to break the main loop when I have nested loops?
Example*:
/*Main loop*/
for(int y = 0; y < 100; y+=10)
{
/*Sub loop*/
for (int x = 0; x < 100; x += 10)
{
if(x == 60)
{
//Break the main loop
}
}
}
*This code do nothing, it's just an example
What should I put in the place of the "Break main loop" comment? In java there are labels which I can break (when i set a label to the main loop named "MainLoop" I can write "break MainLoop;" and it will be valid), but what can I do here?
Thanks in advise!