# Include <iostream> using namespace STD; int main () {// first, so that the pointer cannot modify the object value. Note: in this case, the pointer can point to another object int I = 10; Int J = 100; const int * Pi = & I; // The object value cannot be modified by specifying the pointer. // * Pi = 1000; // error! Pi = & J; cout <* pI <Endl; // second type. The pointer can only point to the current value. In this case, you can modify the object Value int * const CPI = & I; * CPI = 1; // OK // CPI = & J; // error! // CPI ++; // error // The third type can only point to an object, and its value const int * const CCP = & I; // * CCP = 1 cannot be modified; // error // CPP = & J; // error/** generally, the pointer is defined as int * Pi = NULL; * The preceding const-> const int * PI indicates that the PI cannot modify the pointed value * int * const Pi. At this time, the const modifies the PI, indicating that the PI cannot be changed */return 0 ;}