I think you should define the variable as close to the spot the variable is used as possible. That way you don't have to go searching for the variable when you are reading the code.1. Is it best to define variables you will be using in your code at the begining of the code, or slightly before there use, or some other variation?
Neither. The best way is to have a function declaration in a .h file and a function definition in a .cpp file separate from main. The idea is that you can reuse your functions in other programs by inserting them into your project and including the .h file in the file containing main().2. When declaring functions is it best to have a prototype at the begining of your code and the actual function at the bottom, or just write the function at the begining of the code?
The compiler provides you with a default destructor, so unless you need to do more, don't define one--unless you really enjoy typing.3. When writing a class, is it required / good practice, to include a destructor?