title: Getting strings and ints from strtok in C
body: <p>I am trying to get user input which can sometimes be "string string" and other times be "string int". But I am getting an error for argument 3 of <code>sscanf(input,"%d",moves);</code> which states:</p>
  
  <blockquote>
    <p>"warning: format ' ' expects argument of type ' ', but argument 3 has type ' '. </p>
  </blockquote>
  
  <p>I am new to C and finding the debugging rather difficult. So any help here is much appreciated!</p>
  
  <pre><code>char *choice = validateStr();
  char *tok = strtok(choice," \n");
  char *input = strtok(NULL," \n");
  int moves = 0;
  
   else if(strcmp(choice, "forward") == 0){
          sscanf(input,"%d",moves);
          printf("%d",moves);
          forward(list,moves);
  </code></pre>