title: invalid conversion from ‘void*’ to ‘void* (*)(void*)’ c++?
body: <p>I am trying to use pthread_create() but it always gives me this error invalid conversion from <code>void*</code> to <code>void* ( * )(void*)</code></p>
  
  <p>This error is in the 3rd argument. Could someone help me with this error ?</p>
  
  <pre><code>void Print_data(void *ptr) {
      cout&lt;&lt;"Time of Week = " &lt;&lt;std::dec&lt;&lt;iTOW&lt;&lt;" seconds"&lt;&lt;endl;
      cout&lt;&lt;"Longitude = "&lt;&lt;lon&lt;&lt;" degree"&lt;&lt;endl;
      cout&lt;&lt;"Latitude  = "&lt;&lt;lat&lt;&lt;" degree"&lt;&lt;endl;
      cout&lt;&lt;"Height Above Sea = "&lt;&lt;alt_MSL&lt;&lt;" meters"&lt;&lt;endl;    
    }
  
  int call_thread() 
    {
      pthread_create(&amp;thread, NULL, (void *) &amp;Print_data, NULL);
      return 0;
    }
  </code></pre>