I'm assuming that this occurs when you compile and run? If so, then that is nomal behaviour. In order to get the screen to stay put, you have to open a command prompt and navigate to the directory that you have compiled to. Then, just type in the name of the compiled application, passing any arguments to it at the same time. That way, you will see the program run through, and the window will stay open.
Cheers,
Malcolm
'England Expects That Every Man Will Do His Duty' - Vice-Admiral Horatio Lord Nelson - Battle of Trafalgar - 21st October 1805