title: c++ pass child class method to base class method in argument
body: <p>I have a base class which has a method that takes a method pointer (class function pointer) as an argument. I derive a child class from this base class. I then want to pass a method of the child class to the method of the base class.</p>
  
  <p>An example:</p>
  
  <pre><code>    class Base1
      {
          public:
               void BaseMethod(void (Base1::*basemth)(/*arguments list A*/), 
                               double a)){/*definition*/}
      };
      class Derived1 : public Base1
      {
          public: 
               void ChildMethod(/*arguments list A*/)
  
               void ChildMethod2()
               {
                  double double_a = 1.0;
                  void (Derived1::*pntr)(/*arguments list A*/);
                  pntr = &amp;Derived1::ChildMethod;
                  BaseMethod(pntr, double_a); //&lt;---- this fails
               }
  
      };
  </code></pre>
  
  <p>I get "error: no matching function for call to...".</p>
  
  <p>Is this possible? If it is, what am I doing wrong? Any help will be appreciated. I have looked at <a href="https://stackoverflow.com/questions/28568543/child-class-method-pointer-to-method-parent-argument-c">child class method pointer to method parent argument c++</a> but following R Sahu's method does not seem to work, while Slava's answer does not seem relevant (I am not calling a child method from a parent instance).</p>