Jump to content

Recommended Posts

Posted

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.


Posted

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.

Posted

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!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...