Skip to main content
GameDev.net gamedev.net
🔒 Locked

Question about Visual Studio .NET

Started by Deuce Jan 31, 2005 at 10:52 PM 2 replies 750+ views
Original Post
Deuce
Deuce
In Visual C++ 6, when running a console-based application, the console stays open saying "Pres any key to continue..." after it's done executing. In Visual Studio .NET, it doesn't do that, the console just disappears, not giving me any moment to look at whatever I was doing or the end results. Is there a solution to that? I know a workaround is to ask the user for a dummy input, but I'm asking about the real solution, to have it behave like VC++ 6. Thank you all.
Xtreme
Xtreme
Ctrl-F5.
or go to Debug/Start without debugging
Yes! There are kangaroos in Australia but I haven't seen them...yet
Deuce
Deuce
Oh!

Kinda embarrassing!
Thanks. LOL.
jflanglois
jflanglois
You have several options:

You can do "system("pause");" at the end of your program. Not portable.
Or "getch();" at the end of your program. Include or I think ncurses has it as well. Not really portable either.
Or, my favorite, "std::cin.get();" at the end. Include . Portable.

[edit] @Xtreme: And that too... We learn things every day.

Regards,
jflanglois

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.