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