ComputerForum.com ComputerForum.com  
Go Back   Computer Forum > Computer Software > Operating Systems

Reply
 
LinkBack Thread Tools Display Modes
Old 08-02-2006, 02:02 AM   #1 (permalink)
Bronze Member
 
Join Date: Jul 2006
Posts: 29
Default Stop console from closing automatically ???

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"
PanicByte is offline   Reply With Quote


Old 08-02-2006, 02:10 AM   #2 (permalink)
Diamond Member
 
Camper's Avatar
 
Join Date: Mar 2005
Location: /dev/null
Age: 22
Posts: 1,227
Default

start run cmd then type ipconfig
__________________
Dell Inspiron 530
Q6600 Quad
3gb RAM
Nvidia 8600 GT
500GB HD
Camper is offline   Reply With Quote
Old 08-02-2006, 02:14 AM   #3 (permalink)
Bronze Member
 
Join Date: Jul 2006
Posts: 29
Default

Quote:
Originally Posted by Camper
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.
PanicByte is offline   Reply With Quote
Old 08-06-2006, 12:52 AM   #4 (permalink)
Silver Member
 
Markware17's Avatar
 
Join Date: May 2006
Location: I'm not sure exactly, they keep me locked up in some remote data center.
Posts: 136
Default

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;
}
__________________
CRC failed...the end is near.
Markware17 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Recovery console commands...? CuteSniper22 Operating Systems 1 07-01-2006 03:36 PM
Stop Windows from Automatically Installing Drivers Once a Device is Plugged In Jiffyman Operating Systems 3 04-29-2006 02:41 PM
folders closing automatically jp831 Desktop Computers 5 12-06-2005 03:24 AM
How to stop this rebooting? tech_iam_not Desktop Computers 7 09-05-2005 07:24 AM
Stop XP Console App's from closing automaticly kb1ghc Computer Accessories 3 11-14-2004 07:05 PM

All times are GMT +1. The time now is 02:12 AM.


Powered by: vBulletin Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
Copyright © 2002-2008 Computer Forum and Web Design Forum