Int declarations

Everything you quote in post #13 is true but there is one aspect of using a type in front of a variable name that you have missed and that is doing so creates a new variable with the variable name in the scope in which it is declared.

What amuses me is that the title of this thread has the cause of your problem in it.