title: Reading input in using pthreads
body: <p>I am trying to read in input from the command line using a pthread. The pthread would call a reading function. Having some trouble with this and I have read the POSIX documentation. Appreciate the help!</p>
  
  <pre><code>int main(int argc , char *argv[])
  {
      pthread_t client_thread; // client thread
      int rc;
      string msg;
      cout&lt;&lt;"Please enter a message to send to the server: "&lt;&lt;endl;
      pthread_create(&amp;client_thread, NULL, readerT, &amp;msg);
  
      cout&lt;&lt;"Msg is: "&lt;&lt;msg&lt;&lt;endl;
  
      return 0;
  }
  
  void * readerT(string * temp)
  {
      cout&lt;&lt;"GOT IN HERE:\n"&lt;&lt;endl;
      getline(cin,*temp);
  }
  </code></pre>
  
  <p>Current Error Msg:</p>
  
  <pre><code>Client.cpp: In function ‘int main(int, char**)’:
  Client.cpp:33: error: invalid conversion from ‘void* (*)(std::string*)’ to ‘void* (*)(void*)’
  Client.cpp:33: error:   initializing argument 3 of ‘int pthread_create(pthread_t*, const pthread_attr_t*, void* (*)(void*), void*)’
  </code></pre>