"C + + Primer Plus", chapter 6th study notes

Source: Internet
Author: User

Programs and programming are more interesting when you use the bootstrapper to select statements for different actions. C + + provides an if statement, if Else statement, and a switch statement to manage options. An If statement enables a program to execute a statement or block of statements conditionally, that is, if a specific condition is met, the program executes a specific statement or block of statements. The IF Else statement program chooses to execute one of two statements or blocks of statements. This statement can be followed by the if else to provide a range of options. The switch statement Bootstrapper executes one of a series of options.
C + + also provides operators for help decisions. The 5th chapter discusses the relationship expression, which compares two values. The IF and if else statements typically use relational expressions as test conditions. By using logical operators (& &, 丨, and!), you can combine or modify relational expressions to create more granular tests. The conditional operator (?:) Provides a concise way to select one of two values.
The Cctype character Library provides a convenient set of powerful tools for parsing character input.
Looping and selecting statements are useful tools for file I/O, and file I/O is very similar to console I/O. After declaring Ifstream and Ofstream objects, and associating them with files, you can use them as you would with CIN and cout.

"C + + Primer Plus", chapter 6th study notes

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.