Here are the only two ways I know that roughly makes sense:
for (){
for (){
if (found the target) goto cont;
}
}
cont:;
I've seen people strongly recommending against using goto, but I feel like this is a pretty proper way of using it.
bool exit=false;
for (){
for (){
if (found the target){
exit=true;
break;
}
}
if (exit) break;
}
I write a bit more code this way.
What would you say to be the proper way to do this?