Bizzare: variables need to be declared twice, values stored in variables are not saving, help please

Good afternoon,
I'm trying to compile code I found here

But I'm having issues

1 . where I have to declare a variable twice, otherwise the compiler (Visual C++ Express) tells me the variable is undeclared.
Screenshot here:

2. Even more bizzare, I have a variable that gets written to, but I cannot copy data out of it and when I pass it to a function, the passed value is zero

I posted a screenshot of this here

I re-installed VS2010 and I attempted using codeblocks to do this, but the error persisted (in code blocks I never figured out how to put together the project correctly)

Please let me know what may be causing this

1. : I don't see enough of the code to tell what's going on (maybe it's already defined otherwise).

2. : You're trying to debug in the release mode. Switch to debug
Topic archived. No new replies allowed.