I have a recursive function as below,
void func()
{
if(counter>10)
return;
func();
}
Here, I need to come out of the function when counter reaches specific number(10 as per example).
Now, the condition is, I can't take this counter as global or static or can't pass this counter as parameter.
Any suggestion to solve this given above terms.