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
+ operators appear in an expression. The preceding code adds 5 to
y, and then multiplies the result by
z integer is assigned the value 289.
A class could provide the same functionality with
add() member functions, but the ...