I want to get rid of this operator goto. Can anyone tell me the logic for the same. The code below is not the exact code that I want to change, but it will support my question. Please do not ask about the meaning of the code when commenting on this post, as this is just an example.
int result[i][j];
for (int i = 0; i<100; i++)
{
for (j = 0; j<100; j++)
{
result[i][j] = j++;
if (j == 80)
goto break1;
}
}
break1:
…;
source
share