title: Calling C++ member functions via a function pointer
body: <p>How do I obtain a function pointer for a class member function, and later call that member function with a specific object?  I’d like to write:</p>
  
  <pre><code>class Dog : Animal
  {
      Dog ();
      void bark ();
  }
  
  …
  Dog* pDog = new Dog ();
  BarkFunction pBark = &amp;Dog::bark;
  (*pBark) (pDog);
  …
  </code></pre>
  
  <p>Also, if possible, I’d like to invoke the constructor via a pointer as well:</p>
  
  <pre><code>NewAnimalFunction pNew = &amp;Dog::Dog;
  Animal* pAnimal = (*pNew)();    
  </code></pre>
  
  <p>Is this possible, and if so, what is the preferred way to do this?</p>