Why use const with NSString?


On page 202, the code in the h file looks like this:

I thought NSString was already immutable - meaning that the value cannot be changed once it is set. If I understand this, we use const to create a constant. What is the difference between an immutable string and a const?

Thanks for any help,
Paul Lohr


This is constant pointer. You can not change where this pointer points.