i want trace recursive functions and i used Call stack for this idea. for example for the following code:
#include <iostream>
using namespace std;
long power(int , int );
int main()
{
cout<<power(2,3)<<endl;
return 0;
}
//a power b as recursive
long power(int a , int b)
{
if (b==0) return 1;
return a*power(a,b-1);
}
i run program until line [ if (b==0) return 1;] with F4 key. when cursor go to next line(i.e [ return a*power(a,b-1); ] ), i use step into that function appear in call stack but when return from stack (for any call) does not show me any return value.
in VS, in call stack had return value when return from function and stack.
you how to trace recursive functions ?
please help me.