Chapter 3. Examining Expressions and Statements

  • Learn the essentials of C++ expressions

  • See how to use operators and operands

  • Learn to use C++ statements

  • Discover expression statements



A compiler isn’t very smart—it can’t think. It needs a formal set of rules that exactly describes the C++ language so that it knows what we mean by each symbol and combination of letters in our source code. This formal set of rules about how C++ must be written is called C++ syntax. The set of rules that determines meaning and application of these syntax rules is called C++ semantics.


The formal rules that govern how valid instructions are written in a programming language.


The set of rules that provides the meaning of instructions ...

Get Practical C++ now with O’Reilly online learning.

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