Also you are not writing C++ code so all your variable definitions need to be at the top of your functions,
before any executable statements.
And for us to follow your code,
use proper formatting
Reputation Points: 3281
Solved Threads: 895
Posting Sage
Offline 7,747 posts
since May 2006