I am using Visual Studio and I have this C++ recursive program. When I call the recursive function and it pushes local variable in the stack. how can I see what is in the stack.
Set a breakpoint at the recursive call and run the debugger. Then use the "Step Into" button to step as far in as you need. Go to the Debug menu -> Windows, and open up the "Call Stack" and "Locals" windows. In the Call Stack window you can double-click on whatever frame you're interested in, and the Locals window will update with the locals for that frame.