title: ordered comparison between pointer and integer objective-c
body: <p>I've searched for this and actually found alot of results, but I am such a beginner at this that I've got a problem using their answers on my specific case.</p>
  
  <p>My code:</p>
  
  <pre><code>  + (NSUInteger)maxRank { return [self rankStrings].count - 1; }
  
    - (void)setRank:(NSUInteger )rank {
        if(rank &lt;= [PlayingCard maxRank]) {
            _rank = rank;
        }
    }
  </code></pre>
  
  <p>"self rankStrings" is just an array containing a number of strings.</p>
  
  <p>The if statement is, of course, the line that gives the error. I am just unable to understand how the error occurs, I am actually following a lesson from a man called Paul from Stanford and this is his code <em>exactly</em> with the only difference being his working and mine not so much.</p>
  
  <p>As i understand it, maxRank returns a NSUInteger (not a pointer) and in the setter for "rank", "rank" isn't a pointer either. I just dont get it. The rank property looks like this:</p>
  
  <pre><code>@property (nonatomic) NSUInteger rank;
  </code></pre>
  
  <p>Hopefully someone can come up with an answer, got my self a headache because of this.</p>