Mobile Phone | Myspace Proxy | Loans | Mortgages | Loans
DOS windows [Archive] - PCMech Forums

PDA

View Full Version : DOS windows


Greedo
03-05-2003, 08:36 PM
Quick question, how do you stop Win98 from automatically shutting a DOS window after a C++ program has finished? I know I've seen the option around, bur for the life of me I can't find it.


On an unrelated note, has anyone here ever had a terrible C++ class in school? I'm in a C++ for engineering class now, and the prof wastes half of every class period taking out her pent up frustrations over past slights electrical engineers gave programmers. Anyway, I'm about done venting now.

TwoRails
03-05-2003, 10:36 PM
Go into Properties, then the Program Tab, then Uncheck "Close on Exit"

That should do it!

TwoRails

Greedo
03-06-2003, 12:50 AM
Which properties are we talking about here? I get a properties box when I right-click on the source files, but it doesn't have anything about closing windows in it.

Greedo
03-06-2003, 01:05 AM
How about properties in Explorer for the individual .exe file? I have the MyProjects/deflection/Debug/deflection.exe program with a properties->program box and that has close on exit, but it isn't checked. I'd like to have all DOS window programs wait to be closed now that I'm writing short programs. Isn't there a way to make a change for all of them at once? I also changed the properties of MS-DOS prompt to not close at the end, but it hasn't changed the C++ programs.

Sorry, this is a stupid problem I'm having.

aym
03-06-2003, 04:20 AM
You may add a dummy char read in the end of your progam, try adding:

char dummy;
cin >> dummy;

doctorgonzo
03-06-2003, 09:07 AM
Or you can add system("Pause"); to the end of your program.