solidus Posted August 28, 2003 Posted August 28, 2003 I have a problem. When I used to write Win32 console applications in Visual C++ 6, when I had compiled the program, and ran the .exe, it would do what it is supposed to, and stay on the screen, with a PRESS ANY KEY TO CONTINUE dialog, when I was done using the app. I am now using Visual C++ .NET, and still writing those same console apps. However, now, instead of remaining on the screen waiting for me to close it, the window flashes, doing what it is supposed to ( I can just BARELY tell that it is working when I do I simple HELLO WORLD app ) but not staying long enough for me to do anything. I need to have that PRESS ANY KEY TO CONTINUE so I can continue to learn C++ and fiddle with its features without going into the graphical side, yet. So if anyone knows of a feature within the compiler that will enable this, or anything else that will help me, that would be a great help. I want something that will do it automatically rather then adding additional code to the simple prgms I am writing. And that, is my stupid question. Quote
*Experts* mutant Posted August 28, 2003 *Experts* Posted August 28, 2003 Other than starting your application from command prompt you cant do much to keep it there except wait for the user input and then exit. You can use this to achieve that: Console::Read; //or Console::ReadLine; Quote
solidus Posted August 29, 2003 Author Posted August 29, 2003 Thanks, but how come it automatically did it in the older versions of Visual C++? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.