title: Using a constant NSString as the key for NSUserDefaults
body: <p>I'm using NSUSerDefaults to store user preferences. I remember reading somewhere that setting the keys as constants is a good idea - and I agree. The following code is what I currently have:</p>
  
  <pre><code>[[NSUserDefaults standardUserDefaults]
          setObject:[NSNumber numberWithInt:polygon.numberOfSides] 
             forKey:@"polygonNumberOfSides"];
  </code></pre>
  
  <p>I tried changing this to:</p>
  
  <pre><code>@implementation Controller
  
  NSString const *kPolygonNumberOfSides = @"polygonNumberOfSides";
  
  -(void)savePolygonInfo {
      [[NSUserDefaults standardUserDefaults]
              setObject:[NSNumber numberWithInt:polygon.numberOfSides] 
                 forKey:kPolygonNumberOfSides];
  }
  </code></pre>
  
  <p>While this does work, it produces "<code>warning: passing argument 1 of 'objectForKey:' discards qualifiers from pointer target type</code>". I'm keen to keep my code free from compiler warnings. How can I fix this warning?</p>