C and C + + write console programs when a flashback occurs

Source: Internet
Author: User

When writing console applications in C and C + +, there are a lot of times when a flashback is encountered, such as with vs2013 or other compiler tools, the following two types of processing are common:

1. In the main () function, write down system ("pause") before return;//means pause

2, non-debug operation, directly press CTRL+F5; if you press F5 debugging, there will be a flash of the situation, but the method does not apply to the generated EXE file; 3, add a task to the program, that is, define an inline function inline void Keep_window_open (char ch;cin>>ch;), and then add Keep_window_open () at the end of the Mian function; This method is the most effective and most commonly used, 4, other methods, such as setting breakpoints, single-step debugging and so on.
The above methods are for the console application flash back, the specific situation to be treated.

C and C + + write console programs when a flashback occurs

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.