程序清单:
编译运行源程序:
longmenyu@longmenyu-Vostro-1088:~/test/code/cpp$ ./pointer_test
The value of p1 points:I'm string 1
The value of p2 points:I'm string 2
Now the value of p1 points:I'm string 3
Now the value of p1 points:I'm string 2
The value of pi1 points:1024
The value of pi2 points:2048
Now the value of pi1 points:2048
The value of ri1:1024
The value of ri2:2048
Now The value of ri1:2048
The value of ri1 is equal to the value of ri2