Hello,
I have a recursive function and need to put a limit on the stack it can build up (ie. how many times it can call itself). I have two questions.
A. What is a good limit that will work on most machines? Is ten fine?
B. What is a good way of applying the limit? At first I thought I would just use a global or static variable and increment it as I go. The problem with this is how to initialize it. There is obvious problems with initializing it inside the function and I don't want to have to set it before I call the function each time. Is there any neat ways around this?
Thanks heaps!