Highor Posted March 28, 2005 Share Posted March 28, 2005 Hello,i use now: system("PAUSE");than i have to push something or else he will close the window.How can i make you dont have to push anything and he is not closing the window.i just want:cout << "Hello";and you have to close the window your self.i use DEV C++thanks. Link to comment Share on other sites More sharing options...
purewaveform Posted March 30, 2005 Share Posted March 30, 2005 this is actually a windows thing. If you open a dos prompt directly, then run your exe, the window wont close. If you double click on the exe from explorer then the window will close. This has to do with how the process open and closes in windows. If you want to make sure that a window will open when you double click, and not close then you need to move away from a command line process, or you have to have the pause. Link to comment Share on other sites More sharing options...
purewaveform Posted March 30, 2005 Share Posted March 30, 2005 but, if you really wanted to trick it you could just do a batch file that calls the exe inside another call to cmd. that way the exit from the programm closes the second cmd, laving the first cmd window open! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now