title: pthread_create and passing an integer as the last argument
body: <p>I have the following functions :</p>
  
  <pre><code>void *foo(void *i) {
      int a = (int) i;
  }
  
  int main() {
      pthread_t thread;
      int i;
      pthread_create(&amp;thread, 0, foo, (void *) i);
  }
  </code></pre>
  
  <p>At compilation, there are some errors about casting (<code>(void *) i</code> and <code>int a = (int) i</code>). How can I pass an integer as the last argument of <code>pthread_create</code> properly?</p>