Below is a simplified version of the function.
int x;
void myAdd(const double& p)
{
if (x > 100)
{
x = 1;
myAdd(p);
}
++x;
...
}
The advantage of this recursion is that I don't have to write a second function ie myAdd2.
Are there any pitfalls of recursive functions that I should be aware of?