Passing member function to function pointer
<p>I have to pass in a function pointer of a member function to another class. I couldn't get it to compile and I get the "undefined reference to classB::classB(classA::*)(std::shared_ptr) " error. Can someone help me with this?</p>

<p>Thanks.</p>

<pre><code>classA{
  string functionA(share_ptr&lt;int&gt;);
  void functionB(){
     classB* ptr = new classB(&amp;classA::functionA);
  }
}

//in other .h file
classA; //forward declaration

classB{
  classB(string (classA::*funcPtr)(shared_ptr&lt;int&gt;); //constructor
}
</code></pre>
