title: Cast integer array to void pointer - pthread_create
body: <p>for passing arguments, pthread requires void pointer. I want to pass two variables, <code>int</code> and <code>long</code>. To save myself some trouble, I will pass two <code>long</code> instead. So this is what I do:
  </p>
  
  <pre><code>int main(int argc, char *argv[])
  {
     /*SOCKET INIT*/
     pthread_t socketTh;
     long data[2] = {ip2l(IP),80};
     pthread_create(&amp;socketTh, 0, &amp;serverConnect, (void*)data);   //ERROR HERE
     while(true) {
         /*event loop*/
     }
     quit_thread(&amp;sockerTh);      //just an EXAMPLE! I don't know how to quit threads, I will google it later
     return 0;
   }
  </code></pre>
  
  <h3>Error:</h3>
  
  <blockquote>
    <p>error: invalid conversion from 'void (*)(void*)' to 'void* (*)(void*)'</p>
  </blockquote>
  
  <p>But it seems that this is not the correct way to retype long pointer to void pointer. I wonder not of threads Stackoverflow has suggested me didn't help, as well as any Google search. So maybe, try to explain it really slowly, because I'm beginner and I'm still lost in data types.<br>
  Thank you.</p>
  
  <p><strong>Update:</strong><br>
  I create the <code>unsigned long*</code> in main(). This means this variable will last as long as the program itself.</p>