C + + Primer fourth Edition after-school practice solution Exercise 1.2

Source: Internet
Author: User

Note: This essay is directly transcribed in the C++primer (fourth edition) Exercise solution (full version). Here is mainly for the convenience of my repeated reading later.

Exercise 1.2

Modify the program so that it returns-1. The return value of 1 is typically an indicator that the program failed to run. However, the system differs, how (or even) reports that the main function fails to run differently. Recompile and run the program again to see how your system handles the run failure indicator of the main function.

The Windows operating system used by the author does not report that the main function failed to run, so there is no difference between a program returning 1 or returning a 0 run effect. However, if you run the program at a DOS command prompt and then type the echo%errorlevel% command, the system displays a return value of 1.

C + + Primer fourth Edition after-school practice solution Exercise 1.2

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.