Why use const with NSString?


#1

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


#2

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