April 2011
Beginner
464 pages
9h 18m
English
The built-in types in C++ work with operators such as addition (+) and multiplication (*), making it easy to use these types in expressions:
int x = 17, y = 12, z;z = x * (y + 5);
The C++ compiler knows to multiply and add integers when the * and + operators appear in an expression. The preceding code adds 5 to y, and then multiplies the result by x. The z integer is assigned the value 289.
A class could provide the same functionality with multiply() and add() member functions, but the ...