what is recursion in c++.

J

Jim Langston

I need some memory related information about recursion.
That is how it is implemented

AFAIK a recursive function isn't different than a non recursive function.
The function just calls itself like it could call any function pushing the
parameters onto the stack, in an implementation that uses a stack.

With enough recursion you can run out of stack space, which is why there's a
practicle limit to the number of times you can recurse.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top