title: Convert NSString to Integer in objective - c
body: <p>I have an array that stores each digit of a phone number as a string. I then pass the phone number digit string as an argument for <code>objectAtIndex</code>: method of <code>NSArray</code> like this: <code>[myArray objectAtIndex: [myString intValue]];</code> The compiler says I need to cast the String but I am already doing that. What is wrong?</p>
  <h3>Update:</h3>
  <p>Here's my actual line of code:</p>
  <pre><code>NSMutableArray *tmp = [[NSMutableArray alloc] initWithArray:[charHolder objectAtIndex:[[phoneNumDigits objectAtIndex:i]intValue]]];
  </code></pre>
  <p>This is where the error is, <code>phoneNumDigits</code> is an array of each digit of the phone number, <code>charHolder</code> is the array holding the array of letters associated with each digit.</p>