title: Incompatible integer to pointer conversion initializing NSArray *
body: <p>I am running the code like this and it is returning me this error:</p>
  
  <pre><code>Incompatible integer to pointer conversion initializing NSArray *_strong with an expression of type 'int'.
  </code></pre>
  
  <p>The code is like this:</p>
  
  <pre><code>- (NSArray *)randperm:(int)total
  {
      NSMutableArray *array = [[NSMutableArray alloc] init];
      int counter = 0;
      while (counter &lt; total) {
          NSNumber *randomInteger = [NSNumber numberWithInt:(arc4random_uniform(total)+1)];
          if (![array containsObject:randomInteger]) {
              [array addObject:(randomInteger)];
              counter++;
          }
  
      }
      NSArray *arr = [array copy];
      return arr;
  }
  </code></pre>
  
  <p>I am calling it this:</p>
  
  <pre><code>NSArray *array = randperm(6);
  </code></pre>
  
  <p>This line is returning me an error. Not sure why there is a such an error.</p>