Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 03-05-2003, 07:36 PM   #1
Member (7 bit)
 
Join Date: Apr 2001
Location: Minnesota
Posts: 75
DOS windows

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.
Greedo is offline   Reply With Quote
Old 03-05-2003, 09:36 PM   #2
Member (14 bit)
Premium Member
 
TwoRails's Avatar
 
Join Date: Jan 2002
Location: The Great NorthWest
Posts: 12,594
Go into Properties, then the Program Tab, then Uncheck "Close on Exit"

That should do it!

TwoRails
TwoRails is offline   Reply With Quote
Old 03-05-2003, 11:50 PM   #3
Member (7 bit)
 
Join Date: Apr 2001
Location: Minnesota
Posts: 75
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 is offline   Reply With Quote
Old 03-06-2003, 12:05 AM   #4
Member (7 bit)
 
Join Date: Apr 2001
Location: Minnesota
Posts: 75
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.
Greedo is offline   Reply With Quote
Old 03-06-2003, 03:20 AM   #5
aym
Registered User
 
aym's Avatar
 
Join Date: Nov 2001
Posts: 1,965
You may add a dummy char read in the end of your progam, try adding:
Code:
char dummy;
cin >> dummy;
aym is offline   Reply With Quote
Old 03-06-2003, 08:07 AM   #6
Professional gadfly
 
doctorgonzo's Avatar
 
Join Date: Jan 2002
Location: Minneapolis, MN
Posts: 6,364
Send a message via MSN to doctorgonzo
Or you can add system("Pause"); to the end of your program.
doctorgonzo is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 12:31 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2