I have these two classes:

```
class A {
public:
    A() { m_ptr = NULL; }
    void (*m_ptr)();
    void a() { if (m_ptr) m_ptr(); }
};

class B : public A {
public:
    B() { m_ptr = b; }
    void b() {
        std::cout << "B::b() is called" << std::endl;
    }
};

```

And I want to use them like this:

```
B b;
b.a();

```

and get the following to be called `B::b()`.

Of course this is *not* being compiled as `B::b` is not of type `void(*)()`. 

How can I make it work?

UPDATE. To whom who asks "why?" and "what for?".  

The class A is a very basic class which has many successors in production code. The class B is 6-th successor and I want to extend A (the most convinient place) to call there one more method (from B) which can be present and may be not in another successors af A and B.  

A virtual method with empty body can be employed for that but it is ugly and I want to avoid it. Abstract method even more so (because of existing derived successors code).  

I don't want to use external function of type void (\*)() to not loose access to internal data of all hierarchy.