title: missing some basic, issues casting strtok returns to other data types
body: <p>Forgive the basic question, but i'm missing something foundational. Recently found myself having to code after 8 years of complete programming inactivity. </p>
  
  <p>What i'm trying to do is read in a string (known amount of tokens within it), and then take these characters and convert them to integers. </p>
  
  <p>This second part is my problem. I'm sure it's the way i'm handling the pointers,but am unsure exactly where i'm going wrong. </p>
  
  <p>Any tips would be welcome, i'm sure there are several issues below. </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  int main ()
  {
    char str[] ="20\n3000 53\n96";
    char * pch;
  
    int num_one = 0;
    int num_two = 0;
    int num_three = 0;
    int num_four = 0;
  
  
  
    printf ("Splitting string \"%s\" into tokens:\n",str);
    printf("\n");
    pch = strtok (str," \n");
    num_one = atoi(&amp;pch);
    printf ("%s\n",pch);  
    printf ("%u\n",num_one);   
  
    pch = strtok (NULL, " \n");
    printf ("%s\n",pch);  
    num_two = atoi(&amp;pch);
    printf ("%u\n",num_two);  
  
    pch = strtok (NULL, " \n");
    num_three = atoi(&amp;pch);
    printf ("%s\n",pch);  
    printf ("%u\n",num_three);  
  
    pch = strtok (NULL, " \n");
    num_four = atoi(&amp;pch);
    printf ("%s\n",pch);  
    printf ("%u\n",num_four);      
    return 0;
  }
  </code></pre>
  
  <p>Current output(can't get it to format correctly, but the \n are behaving as they should):</p>
  
  <p>Splitting string "20 
  3000 53
   96" into tokens:</p>
  
  <p>20
  0
  3000
  0
  53
  0
  96
  0</p>