
VC 5.0 and 6.0 Debugger Bug
Hmmm...even if this is a bug, I'd be confused myself about which 'number'
to use...
Quote:
>Hi!
>This a very dangerous bug!!!
>Run this code:
>/////////////////
>#include <stdio.h>
>int main()
>{
> int number;
> number = 1;
> if(1)
> {
> int number;
> number = 0;
> }
> if(number) // Put a breakpoint here and read the value of
> // number. The watch says number = 0
> // Althought the string will be printed. Corect.
> // But the de{*filter*} can trap you by showing a wrong value
> {
> printf("This string will be printed\n");
> }
> return 0;
>}
>//////////////
>florin
---------------------------------------------------------------------------
-----
Principal Software Engineer Corporate Web Page: http://www.*-*-*.com/
Eden Prairie, MN Personal Home Page: http://www.*-*-*.com/ ~nde
"Question authority...and the authorities will end up questioning YOU!"
--------------------------------------------------------------------------------