"was not declared in this scope" - help needed

At the top of this Forum is a post titled Useful Links. Within that is a section called C++ Programming, and within that is a section on Scope. You might find that section useful.