Thanks, but whats really confusing me is that it runs fine, the code works when I compile it with my g++.
I understand the code itself is wrong, but why does it seem to run fine? If you or someone else compiles and run it could you tell me if it runs the same way.
As far as my professor using an outdated visual c++ he has mentioned that newer versions are closer to standards and if anyone has issues with different versions to discuss it with him.
So what I am getting at is that it works with g++ in linux but not windows g++ (devc++) or the microsoft compiler.
I accept that the code is wrong and wont make the mistake again, but I am worried that my compiler is steering me wrong and I don't want to loose anymore points because of it.... (for my current assignment I am in windows and using devc++, but I like linux better

so I would like to track this down.
thanks again!