Wow thanks everyone for all the help so far.
I've just started C++ and some of these threads go over my head.
It's nobody's fault but my own. I've written the code the way it is because its easier for me to understand. Also im working on file input and outputs.