stack overflow problem in recursion

hello, I am using Recursion in my c++ program,i got a problem of stack overflow.can any one send the code for handling this problem.
Stack overflow means you've recursed too many levels.

There is no "code" to fix this problem. It is a problem with your design.
Stack overflow mean that you do not end the recursion.
The capacity of the stack for the program is limited.
Every time you recurse,the program will push the data into the stack.
when you've recursed too many levels,the stack will be full and overflow.
There are two possibilities. One is that your program is buggy, which means you didn't put an end condition for the recursion. The other is the problem you are dealing with is way too complex. If it's the latter case, I'd suggest you implement your program in non-recursive manner.
Topic archived. No new replies allowed.