If doesn’t mind using goto
also can be done in following way. This one saves from extra if
check and higher scope variable declaration.
for(int i = 0; i < foo; i++)
if(bar(i))
goto m_label;
baz();
m_label:
...
If doesn’t mind using goto
also can be done in following way. This one saves from extra if
check and higher scope variable declaration.
for(int i = 0; i < foo; i++)
if(bar(i))
goto m_label;
baz();
m_label:
...