Recursion and for loop

Hello,

i'm creating a program that solves graph problems, and, for searching for a shortest way from point to point, i made a recursion. And instantly faced a problem.

void myrecursion (int blabla)
{
for (int i=0; i<n; ++i)
{
if (condition) {myrecursion (blabla2);}
}
}

In this prototype I had such a problem: when myrecursion(blabla2) is called, and program gets deeper in recursion, the main recursion will NOT continue "for" loop with other i values. If (condition) = (i==2) and n=10, then i values 3-9 will not be checked in main recursion's condition! why? maybe i need to post all recursion code, maybe it contains error? or this prototype is errorneous? what should i use instead? please help!

Mantas
What you are describing should not be happening given the above code. You'll need to post your actual code.
Topic archived. No new replies allowed.