title: Pass a non-static method pointer as an argument to another method
body: <p>Sorry to ask such a question as I'm sure it's been answered before, but I'm struggling to find an answer and it's not for the want of looking...  anyway..</p>
  
  <pre><code>class foo
  {
      void read(void (*func)(obj&amp;))
      {
          // many things happen to obj...
          (*func)(obj);    // Calls the function pointer to the handler.
      }
  
  };
  class bar : public foo
  {
      void handler(obj&amp;)
      {
          // 
      }
  };
  
  void main()
  {
      foo f;
  
      typedef void (foo::*funcptr)(obj&amp;);
      funcptr ptr = &amp;foo::handler;
  
      f.read(ptr);   ????
  }
  </code></pre>
  
  <p>So basically, all I'm trying to do is pass the non-static member method called handler as a function pointer to the read method, so that when the callback is executed, the handler is called.</p>
  
  <p>I've tried all sorts of ways to make this work and don't want to make static methods (for reasons I won't go into).  I think I'm pretty close, but have sort of fallen over right at the end!  Any help would be appreciated.</p>