since ptr2 is a reference to ptr1, when you change ptr1 the change is also reflected in ptr2. What you can't do with ptr2 is assign a new value to it like *ptr2 = 2; is an illegal statement because ptr2 is a const.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343