title: Thread for member functions
body: <p>I was trying to make threads for the following function</p>
  
  <pre><code>void SortingCompetition::masterSort(int low, int high)
  </code></pre>
  
  <p>like this:</p>
  
  <pre><code>  thread a(&amp;SortingCompetition::masterSort,this, low, j-1);
      thread b (&amp;SortingCompetition::masterSort,this, j+1,high);
  </code></pre>
  
  <p>and get the following error.</p>
  
  <pre><code>sortingcompetition.cpp:55:16: error: no matching constructor for initialization
    of 'std::__1::thread'
      thread b (&amp;SortingCompetition::masterSort,this, j+1,high);
             ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/thread:374:9: note: 
    candidate constructor template not viable: requires single argument '__f',
    but 4 arguments were provided
  thread::thread(_Fp __f)
      ^
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/thread:263:5: note: 
    candidate constructor not viable: requires 1 argument, but 4 were provided
  thread(const thread&amp;);
  ^
     /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/thread:270:5: note: 
    candidate constructor not viable: requires 0 arguments, but 4 were
    provided
  thread() _NOEXCEPT : __t_(0) {}
  </code></pre>
  
  <p>I'm new to threads, so I'm not sure what to do.</p>