title: Language C strtok has some error
body: <p>I have a problem with my code, I keep on getting the compiler error:</p>
  
  <blockquote>
    <p>error message : 
    <strong>warning: assignment makes pointer from integer without a cast</strong></p>
  </blockquote>
  
  <p>My code is simple:</p>
  
  <pre><code>int i;
  int arr1[8], arr2[8];
  char test[] = "1|a|b;2|c|d;3|e|f";
  char *split1, *split2;
  
  split1 = strtok(test, ";");
  for(i = 1; i &lt;= 8; i++){
    arr1[i] = split1;
    split1 = strtok(NULL, ";");
    printf("result=%s\n", arr1[i]);
  }
  </code></pre>
  
  <p>When I fix the compiler error, my code can't print value and vice versa!</p>