title: How to pass parameters to a thread in c multithreading properly
body: <p>I'm trying to learn on C multithreading, and I've seen a couple of rare things.</p>
  
  <p>I understand that passing parameters to a thread must be done with pointers. I've found an example which I don't understand. I'll copy the relevant lines:</p>
  
  <pre><code>pthread_t tid[MAX_THREADS]
  int n_veg
  pthread_create(&amp;tid[n],NULL,caracter,(void *)n_veg)
  </code></pre>
  
  <p>caracter is obviously a predeclared function.</p>
  
  <p>Now, why do we use a void pointer casting instead of a int pointer casting? Is there any relevant difference?</p>
  
  <p>Secondly, why do we use a pointer casting in the first place? Can't we use "&amp;n_veg" like with the first parameter?</p>
  
  <p>Thanks in advance.</p>