Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++ 2005
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 3rd, 2008, 12:04 PM
Registered User
 
Join Date: Mar 2005
Location: , , .
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?

Thanks,




  #2 (permalink)  
Old April 6th, 2008, 10:41 AM
Registered User
 
Join Date: Apr 2008
Location: singapore, , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

  #3 (permalink)  
Old July 11th, 2008, 03:11 AM
Registered User
 
Join Date: Dec 2006
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Use Ctl+F5

 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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



All times are GMT -4. The time now is 02:41 PM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.