For example;
How can you return 0 to main, from within another function? Is there a standard way of doing this, or will I have to make somefunc return some special value that gets checked by an if statement within main and then that will return 0 to main?Code:int func (int someval){ if (someval == 3) { // make int main return 0; } return 0; } int main (){ for (int i = 0 ; i < 10 ; i++){ func(i); } return 0; }