I have a few simple lines of code (below). [bp] indicates a breakpoint.
for(int i=0;i<300;i++){}
int i=0;
cout<<i;
[bp] for (i=0;i<200;i++){}
When I debug this in visual studio, it tells me that i is equal to 300 on the breakpoint. Annoyingly, 0 is printed to the console. Is there any way to make it realize that two variables in different scopes can actually have the same name?
I also want to add some code to the second loop and then debug it - but when I try to do that, i is consistently shown as 300. Very annoying.