< Previous | Contents | Next >

Using Arithmetic Operators

Whether youre tallying up the number of enemies killed or decreasing a players health level, you need your programs to do some math. As with other languages, Cþþ has built-in arithmetic operators.


 

Introducing the Expensive Calculator ProgramAdding, Subtracting, and MultiplyingUnderstanding Integer and Floating Point DivisionUsing the Modulus OperatorUnderstanding Order of Operations