title: starting thread with member function having arguments
body: <p>I want to create a <code>std::thread</code> with member function <em>callReverse</em> and 2 other of class <em>threadedName</em>.
  It's clear how to do it for function taking no arguments and returning void from this StackOverflow question <a href="https://stackoverflow.com/questions/10673585/start-thread-with-member-function">start thread with member function</a>
  What is the correct way of doing the same for function taking arguments?
  Can this be used for functions returning some non-void values?</p>
  <pre><code>#include &lt;bits/stdc++.h&gt;
  #include &lt;thread&gt;
  using namespace std;
  class threadedName
  {
      // class body
      void callPermute()
      {  // function body 
      }
      void callReverse(char s[])
      {  // function body  
      }
      void callRearrange(char s[])
      { // function body  
      }
  };
  int main()
  {
      threadedName ob;
      // doing something
  
      thread td1(&amp;threadedName::reverseWords, &amp;ob);
      thread td2(&amp;threadedName::callPermute, &amp;ob);
      thread td3(&amp;threadedName::callRearrange, &amp;ob);
  
      td3.join();
      td2.join();
      td1.join();
  
      return 0;
  }
  </code></pre>