Chapter 4. C++ Control Flow

Topics in this Chapter

In the previous chapter, we discussed the cornerstone of C++ programming: data types and operators that combine typed values into expressions and statements. In this chapter, we will look into the next level of programming—putting statements together to implement algorithms capable of decision making and executing different segments of code depending on external circumstances.

The proper use of control constructs is one of the most important factors that define the quality of code. When the flow of execution is sequential and the statements are executed one after another in fixed order, it is relatively ...

Get Core C++ A Software Engineering Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.