Computing.Net > Forums > Programming > DOS windows close automatically

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

DOS windows close automatically

Reply to Message Icon

Name: Rapha
Date: October 31, 2002 at 22:50:16 Pacific
OS: windows xp
CPU/Ram: p3 933 MHz 256 MB
Comment:

hi there, i have this little problem:

every time i execute a c++ program on DOS, the window closes automatically after the program finishes. Therefore i have to include the getch() function at the end of every program.
But i would really prefer not to do this on EVERY program and just find a way to configure DOS so the windows won't close anymore. Any suggestions?? Thanks.



Sponsored Link
Ads by Google

Response Number 1
Name: Burbble
Date: November 1, 2002 at 10:24:18 Pacific
Reply:

You could go to Start > Run > and type "Command" to open a DOS window (or open it from Start > Programs > Accessories), and then run your program from there (for example, type cd\Pathofyourprogram and then Nameofyourexecutable.exe).

-Burbble


0

Response Number 2
Name: mm_freak
Date: November 2, 2002 at 10:37:01 Pacific
Reply:

There are ways for DOS and Win32 console applications to determine the calling process. If it isn't cmd.exe or command.com, call getch().


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


vb bugs word 2000 vba problem



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: DOS windows close automatically

Prevent DOS window from closing www.computing.net/answers/programming/prevent-dos-window-from-closing/14018.html

.bat files automatically closing... www.computing.net/answers/programming/bat-files-automatically-closing/7611.html

How to close an application automat www.computing.net/answers/programming/how-to-close-an-application-automat/17817.html