|
-
Apr 24th, 2002, 05:18 AM
#1
Thread Starter
New Member
how not to show the "press any key to continue" in visual C++
Hi i would like to ask if there is a way to get rid of the message "press any key to continue" after you run a c++ program ?? thanks!!
-
Apr 24th, 2002, 12:27 PM
#2
Monday Morning Lunatic
It only appears when you run it from the IDE, because VC runs another program which runs yours, then puts up the message.
It doesn't add any extra code to your program to do it - run it from a command.com/cmd.exe prompt to see It does it so that you don't lose the output straight away.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Apr 24th, 2002, 05:27 PM
#3
Addicted Member
you can also put the following at the end of you program:
which basically pauses the program, waiting for something to be written.
-
Apr 25th, 2002, 06:47 PM
#4
I think there's at least two ways to run the module from within VC++, but I think only one of them does that.
-
Apr 26th, 2002, 06:01 PM
#5
Monday Morning Lunatic
Originally posted by tbarnette
I think there's at least two ways to run the module from within VC++, but I think only one of them does that.
Running it through the debugger won't give you that, but it does run a bit slower and certain things act differently (esp. when your program dies ).
In short - F5 for debugger and no prompt. Ctrl-F5 for no debugger and a prompt
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|