Chapter 6. Branching Statements and Logical Operators

One of the keys to designing intelligent programs is to give them the ability to make decisions. Chapter 5, “Loops and Relational Expressions,” shows one kind of decision making—looping—in which a program decides whether to continue looping. This investigates how C++ lets you use branching statements to decide among alternative actions. Which vampire-protection scheme (garlic or cross) ...

Get C++ Primer Plus, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.