title: C++ - Pthread how to send in value
body: <p>How do I send in a <code>std::string</code> into my thread?</p>
  
  <p>This is my code:</p>
  
  <pre><code>void* sendReminder(void*) 
  {
      system("echo 'hello' &gt;&gt; buffer.txt");    
  }
  
  int main()
  {
      string str1 = "somevalue";
      pthread_t t1;
      pthread_create(&amp;t1, NULL, &amp;sendReminder, NULL);
  }
  </code></pre>