title: Retrieve Value from NSString
body: <p>i have a NSString instance ,i want to retrieve value from it and store it into an integer.
  This is wat i am doing but its not working.</p>
  
  <pre><code>NSString *totalcnt;
  char *str = totalcnt;
  int a = atoi(str);
  </code></pre>
  
  <p>Help me out.
  Thanks</p>
  
  <p>Taimur</p>