Stupid Question but stumped.

  • Thread starter Heineken Man
  • Start date
H

Heineken Man

Guest
Ok I know this is a stupid question but I am not sure how to correct this. Ok I am reading a book on "C" and it starts with some simple codes that open up a dos window and display some text. Well the question is how the hell do I keep the dos window open. As far as I can tell all my scripts work but it flashes so quick that I can hardly get a glance. It is begining to annoy me. Anyone know how to stop dos from closing after it runs the script?

Thanks for all that reply,
Heineken Man
 
Try to read a value from i/o at th end of your code ( getch(), scanf(...) )....read MSDN for more information about these funcion.
 
try this(works in java, which is much the same)

make sure u initialized the input stream thingy(IStream in java)

then add to the end before closing the brackets 'Input.pause();'

that will leave the window open until u hit return


or put in while(true){}

which will leave the window open until it is closed manually
 
you need to run the programs from a dos window not from "run" or the built in run


i.e go to start->run and type cmd

then change to your directory and run the program

I will look into keeping a command window open (it is a windows thing not your program)
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,623
Latest member
AndersonLo
Back