Because pointers hold addresses of values and not the desired values themselves, it is a good idea to differentiate between them by naming the pointers slightly differently than the direct variables. There are several naming conventions that are more or less in widespread use. This includes prefixing or suffixing ptr or p to the name of the variable identifier. So, our identifiers may appear as follows:
int anInteger;
int* ptrAnInteger; // prefix ptr-
int* pAnInteger; // prefix p- (shorthand)
int* anIntegerPtr; // suffix -Ptr
int* anIntegerP; // suffix -P (shorthand)
The general advice is to pick one of these conventions and use it consistently throughout your code. Of the four shown, the p-shorthand prefixis probably the most common and easiest to both type (with your keyboard) and read. This convention will be used for the remainder of this book. So, when we see, saypDimension, we know immediately that it is a variable that is a pointer. This...