title: Invalid conversion from ‘void*’ to ‘pthread_t*’
body: <p>I'm writing a C/C++ code to practice PThreads. I'm working off my instructor's example. I'm getting an error. I don't know how to proceed. The error is: Invalid conversion from ‘void*’ to ‘pthread_t*’, and it is caused by the malloc line.  </p>
  
  <p>I left some code out. thread_count is a global variable, and its value is captured at the command line. </p>
  
  <pre><code>#include &lt;cstdlib&gt;
  #include &lt;cstdio&gt;
  #include &lt;sys/time.h&gt;
  #include &lt;pthread.h&gt;
  
  int main(int argc, char *argv[])
  {
     // this is segment of my code causing error
     // doesn't like the third line of code 
     static long thread; 
     pthread_t* thread_handles;
     thread_handles = malloc(thread_count*sizeof(pthread_t)); 
  }
  </code></pre>