Quote Originally Posted by SledgeHammer_999 View Post
I just copy&pasted your code from pastebin into Notepad. Then saved the file as main.cpp. Then did g++ main.cpp and I had a new .exe that worked perfectly in my computer(WinXP).

I suggest you do the same and not involve IDEs in order to isolate the problem.
I agree with you! It is always best to islolate the problem first.