title: Thread inside a class with member function from another class
body: <p>Can someone tell me how can I run a new thread with member function from a object of diffrent class as a member function of this class ? What ever im trying to do Im still getting errors.</p>
  
  <blockquote>
    <p><code>no match for call to '(std::thread) (void (Boo::*)(), Boo&amp;)'|</code><br>
    <code>no match for call to '(std::thread) (void (Foo::*)(), Foo*)'|</code></p>
  </blockquote>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;thread&gt;
  using namespace std;
  class Boo
  {
  public:
      void run()
      {
          while(1){}
      }
  };
  
  class Foo
  {
  public:
      void run()
      {
          t1(&amp;Boo::run,boo);
          t2(&amp;Foo::user,this);
      }
      void user();
      ~Foo(){
          t1.join();
          t2.join();
      }
  private:
      std::thread t1;
      std::thread t2;
      Boo boo;
  };
  int main()
  {
      Foo foo;
      foo.run();
  }
  </code></pre>