Wrox Programmer Forums
Visual C++ 2005 For discussion of Visual C++ 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 3rd, 2008, 11:04 AM
Registered User
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default C++ console app

I am trying to run a CLR console app. It simply prints "Hello World" to a console window like

Console::Writeline("Hello World!");

return 0;

the problem I am having is that the console window immediately disappears when the program is run from VS2005. I don't get the line

Press Any Key To Continue . . .

How can I get the console window to stay put until I press a key?


Old April 6th, 2008, 09:41 AM
Registered User
Join Date: Apr 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

Hi there, im not sure if this was what you are looking for but try adding a line 'system("pause");' just before the return 0. Hope that helps

Old July 11th, 2008, 02:11 AM
Registered User
Join Date: Dec 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts

Use Ctl+F5

Similar Threads
Thread Thread Starter Forum Replies Last Post
Schedule a console app hamilton General .NET 1 January 5th, 2007 10:50 AM
Console App Notify Icon Events invid C# 2005 0 January 21st, 2006 03:53 PM
is making console app using C# a waste rahulmballal BOOK: Professional C#, 2nd and 3rd Editions 0 January 25th, 2005 11:13 AM
invisible console app asmotritsky Visual C++ 1 November 25th, 2004 03:27 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.