8.8. Pointer Expressions and Pointer Arithmetic
This section describes the operators that can have pointers as operands and how these operators are used with pointers. C++ enables pointer arithmetic—a few arithmetic operations may be performed on pointers. Pointer arithmetic is appropriate only for pointers that point to built-in array elements.
A pointer may be incremented (
++) or decremented (
--), an integer may be added to a pointer (
+=) or subtracted from a pointer (
-=), or one pointer may be subtracted from another of the same type—this particular operation is appropriate only for two pointers that point to elements of the same built-in array.
Portability Tip 8.2
Most computers today have four-byte or eight-byte integers. Because ...