Home > Articles

This chapter is from the book

4.15 Wrap-Up

In this chapter, we completed our introduction to all but one of C++’s control statements, which enable you to control the flow of execution in functions. Chapter 3 discussed if, ifelse and while. Chapter 4 demonstrated for, dowhile and switch. We showed C++17’s enhancements that allow you to initialize a variable in the header of an if and switch statement. You used the break statement to exit a switch statement and to terminate a loop immediately. You used a continue statement to terminate a loop’s current iteration and proceed with the loop’s next iteration. We introduced C++’s logical operators, which enable you to use more complex conditional expressions in control statements.

In the Objects-Natural case study, we used the miniz-cpp open-source library to create and read compressed ZIP archive files. Finally, we introduced more of C++20’s powerful and expressive text-formatting features. In Chapter 5, you’ll create your own custom functions.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.