title: cannot convert from type void* (class name)(void*) to type void* (*)(void*) in a pthread
body: <p>I am trying to create a thread in main function and call a function of another class through my thread.</p>
  
  <p>In main.cpp:</p>
  
  <pre><code>SocketHandler *callserver;
  pthread_t thread1;
  pthread_create(&amp;thread1,0, callserver-&gt;createSocket,NULL);
  </code></pre>
  
  <p>and in SocketHandler.h:</p>
  
  <pre><code>void* createSocket();
  </code></pre>
  
  <p>and in SocketHandler.cpp:</p>
  
  <pre><code>void * SocketHandler::createSocket()
  {
      //....
  }
  </code></pre>
  
  <p>When I am trying to compile main.cpp I am getting an error </p>
  
  <blockquote>
  <pre><code> cannot convert SocketHandler::createSocket from type void* (SocketHandler::)() to type void* ( * )(void*)
  </code></pre>
  </blockquote>