He means you could essentially emulate the recursion yourself, take this example:
task t(num)
{
std::stack tasks;
tasks.push(num)
while(tasks is not empty)
{
perform operations with tasks.top()
instead of recursion, push another number onto tasks
to 'return' a value, pop the top of tasks and store the return somewhere
}
}
I don't see how to change it without using for loops, though, and I don't understand this stack business. How does it work in a program with multiple calls?
The function would no longer be truly recursive, and therefor would no have multiple calls. std::stack would be used to emulate the effect of recursion without as much overhead and wouldn't require any nested for loops.