Constants (Constant)
The const variable in C + + must be assigned an initial value when defined. The const pointer also needs to assign an initial value.
Const binding pointer * There are three common types:
1, const int* A; A is a pointer to a long integer, the integer cannot be modified, but the pointer can be modified. The value you are pointing to is a constant.
2, int* const A; A is a constant pointer to an integer, and the number of points can be modified by I, but the pointer cannot be modified. The address value is a pointer to a constant.
3, const int *CONST A; A is a constant pointer to a constant integer number, and the pointer and the number of digits it points to cannot be modified.
Classification tip: X is the base (bounds), X left and x right two parts. The right side of X indicates what type of variable is itself, and the left side of X indicates what type the pointer is pointing to.
For example 1 This explains: (this pointer is to a variable of const int, so a cannot be modified, but the pointer can be modified).