Visual Studio Console Program Output window a flash-through workaround

Source: Internet
Author: User

Write a Hello World program and try to find out that the Output window will flash past the end of execution, and there is no word from press any key to continue. Whether this happens in Visual Studio 2008, 2010, or 2012, some people might use one of the following two methods:

Add System ("pause") or GetChar () at the end of the program code. In fact, this is a DOS command. In fact, the problem is that you press the F5 when performing, and the correct should be ctrl+f5, so the window will show the presses any key to continue ... This sentence. You can also see the results of the program running.

Because, F5 is the debugging mode, in this mode, the window will not remain open when the program finishes running. And Ctrl+f5 is the Start without debugging mode, in this mode, you can see the results of the operation.

If you press Ctrl+f5 is still a flash, then please follow the following settings:
The System--subsystem (on the right side of the window)--, configuration properties, properties---right-click on project, select Console (/subsystem:console)

Visual Studio Console Program Output window a flash-through workaround

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.