Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 06-30-2005, 05:29 PM   #1 (permalink)
 
Ultra Techie

Join Date: Jun 2004

Location: Minnesota

Posts: 962

toxicity_27 is on a distinguished road

Send a message via MSN to toxicity_27
Default How do I....?

Well I finally figured out how to use my compiler for C yesterday. The only thing that confused me was, when I ran my little dinky programs, the DOS prompt box, flashed for a fraction of a second and then disappeared. Even when I had to input information, and then it would display things, it flashed for a fraction of a second and disappeared. Is there a way I can get it to stay up until I close it, or am I screwed because Microsoft sucks?
__________________
Desktop: Core 2 Duo E6600 @ 2.4, Asus P5B-E, 3GB G. Skill DDR2 800, eVGA 8800GT Superclocked 512MB, 22" LG, 19" NEC
Laptop: HP Pavilion dv9500, Core 2 Duo T7300 @ 2.0, 3GB G. Skill DDR2 667, nVidia 8600 M GS 512MB, 17"
toxicity_27 is offline  
Old 06-30-2005, 05:46 PM   #2 (permalink)
 
Ultra Techie

Join Date: Sep 2003

Location: Bamberg, Germany

Posts: 549

Iron_Cross

Send a message via ICQ to Iron_Cross Send a message via MSN to Iron_Cross Send a message via Yahoo to Iron_Cross
Default

It's doing what it's designed to do,
1. Open
2. Run
3. Close
So, you can either input a getline or cin call at the end of the program, use a pause function, or run it from the command line yourself. Any of those solutions will get you the desired result.
__________________

See today\'s Penny-Arcade!(May contain foul lanuage)
Pain is weakness leaving the body.

PM Me for my MSN
Iron_Cross is offline  
Old 06-30-2005, 06:29 PM   #3 (permalink)
 
Ultra Techie

Join Date: Jun 2004

Location: Minnesota

Posts: 962

toxicity_27 is on a distinguished road

Send a message via MSN to toxicity_27
Default

How do I run it from the command line myself?
__________________
Desktop: Core 2 Duo E6600 @ 2.4, Asus P5B-E, 3GB G. Skill DDR2 800, eVGA 8800GT Superclocked 512MB, 22" LG, 19" NEC
Laptop: HP Pavilion dv9500, Core 2 Duo T7300 @ 2.0, 3GB G. Skill DDR2 667, nVidia 8600 M GS 512MB, 17"
toxicity_27 is offline  
Old 07-01-2005, 09:29 AM   #4 (permalink)
 
Ultra Techie

Join Date: Sep 2003

Location: Bamberg, Germany

Posts: 549

Iron_Cross

Send a message via ICQ to Iron_Cross Send a message via MSN to Iron_Cross Send a message via Yahoo to Iron_Cross
Default

Compile it into a .exe
Click Start->Run->Cmd
Type:
Code:
cd <dir of .exe>
<name of .exe with out the .exe....If the name is Help.exe just type Help>
Replace the parts insde the < and the > with what it says.
__________________

See today\'s Penny-Arcade!(May contain foul lanuage)
Pain is weakness leaving the body.

PM Me for my MSN
Iron_Cross is offline  
Old 07-05-2005, 04:11 AM   #5 (permalink)
 
Newb Techie

Join Date: Jul 2005

Posts: 9

tspier2

Send a message via Yahoo to tspier2
Default

When writing the code, underneath your cout<<""; area, add

("pause")
return 0;

That will keep your window open, and return 0; tells the computer to return back to point zero.
tspier2 is offline  
 
Closed Thread

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