I have this kind of code:
main()
{
for(i=0;i<100;i++)
{
if(cond1)
func(1); //Just some logics are present here
if (cond2)
if(cond3 | cond4)
func(2);
and so on....
}
}
void func(int)
{
do somthing;
if cond5
continue;// this is for the FOR loop in main() & I know this doesnt make sense.
}
So, Depending on some IF condition in the function ‘func’, I want to ‘continue’ the FOR loop present in main(). How to achieve this?
Thanks in advance…
Return bool from your function and continue on false. Using your example: