Whenever the console program ends in MSVC++ 6, it always says Press any key to continue. How do I get rid of that?
Whenever the console program ends in MSVC++ 6, it always says Press any key to continue. How do I get rid of that?
Run the thread from the dos prompt....not Bulid->Execute inside of MSVC
Is there another way? I can't tell the user to "Go open this program in the dos prompt" because most of the users are going to be lazy and/or stupid.
Unless you're distributing all the source files and getting the users to build, link and execute the program from within their copies of MSVC, it'll be ok.
Isn't there just a simple command to just close the window? If there isn't there really should be.
You don't need it, MSVC(the IDE) keeps the window open. Executing the program in any other environment will result in normal behaviour.
well you can create an bat file which opens dos prompt fro whic the file is run....
If you run the executable directly instead of running it from MSVC++ then it will close automatically when the program ends.
-Prelude
My best code is written with the delete key.
If your users are lazy enough not to open DOS prompt, then create a ShortCut on the Desktop, or use the Start -> Run command.
Basically you have to understand that the "Press any key to continue..." prompt is added by the Visual C++ environment, and is not a part of your program. So whenever you run your program individually, this will not be there.