title: boost::bind thread for pointer to function with argument
body: <p>I have a function foo(myclass* ob) and I am trying to create a consumer thread using consumer_thread(boost::bind(&amp;foo)(&amp;ob))</p>
  
  <p>The code does not compile which I believe is due to my inappropriate way of passing the function argument to the function pointer.</p>
  
  <pre><code>class myclass{
  // stuff
  }
  
  void foo(myclass* ob){
  // stuff
  }
  
  int main(){
  myclass* ob = new myclass();
  boost::thread consumer_thread()boost::bind(&amp;foo)(&amp;ob));
  // stuff
  }
  </code></pre>
  
  <p>What am I doing wrong? Can anyone here elaborate on boost::bind and how to pass function pointers with function arguments?</p>
  
  <p>Thanks in advance!</p>