title: How can I get argv[] as int?
body: <p>i have a piece of code like this: </p>
  
  <pre><code>int main (int argc, char *argv[]) 
  {
     printf("%d\t",(int)argv[1]);
     printf("%s\t",(int)argv[1]);
  }
  </code></pre>
  
  <p>and in shell i do this:</p>
  
  <p><code>./test 7</code></p>
  
  <p>but the first printf result is not 7, how can I get argv[] as a int? many thanks</p>