Stop console from closing automatically ???

PanicByte

New Member
is there a way to make a console window stop closing automatically when the program ends.

It is very annoying, the only way I know to avoid it from closing automatically is to launch the program from the command line.

an example of this annoyance is to goto Start > run > "ipconfig"
 
Camper said:
start run cmd then type ipconfig


Well duhhhhhhhhhhh!!!! i know that, in fact, i just said that. good job stating the ovious.

i'm wondering if there is a registry mod i can do or something so that the damn console doesn't close all the time by itself, so that i have to actually close the window myself.

it gets very annoying when you are programming simple console apps in C++ and you can't see the end result w/o it closing.
 
What compiler are you using? Most of time with console apps you have to tell the system to pause before the program terminates. Here is an familiar example app coded in the Dev-C++ IDE, compiled under the Mingw port of GCC.

#include <cstdlib>
#include <iostream>

using namespace std;
int main(int argc, char *argv[])
{
cout << "Hello World!!!" << endl;
system("PAUSE"); //Tells the system to pause before terminating
return EXIT_SUCCESS;
}
 
Back
Top