Alright, I wanna know why this code is working, I just realized that I have two variables with the same name within the same scope.
I\'m using g++ (gcc 4.4).
Because you are allowed to have two variables of the same name within the same scope, but not within the same declaration space. The compiler takes the most-local variable of the appropriate name, similar to how you can 'hide' global variables of name X with a member variable of name X. You should be getting a warning though.