I have a bit complex situation. It may can easily be solved by inheritance, but I am now curious and due some other reasons I would solve it this way.

I have class which represents an algorithm and with time a different solution has been implemented. Currently, I have the original class, and it's member is the new one.
I would have both of the algorithm and a switch to be able to use them according to the situation. 

```
#include "B.h"
class A {
public:
    typedef void ( A::*FooFunction )( float, float );
    A::FooFunction m_fooFunction;
    B m_b;

    A( WhichUseEnum algorithm ) : m_b( B() )
    {
        switch( algorithm ) {
        case ALG_A:
            m_fooFunction = &A::FooFunctionOfA;
            break;
        case ALG_B:
            m_fooFunction = ??? // something like: m_b.FooFunctionOfA
            break;
        }
    }

    void FooFunction( float a , float b)
    {
         ( this->*m_fooFunction )( a, b );
    }

    void FooFunctionOfA( float, float ); // implementation at the .cpp
};

class B {
public:
    void FooFunctionOfB( float, float );
}

```

As you can see, I want to save the pointer to function of the member m\_b and call it as the FooFunction does. With the own function ( FooFunctionOfA() ) I was already successful, but the other is much harder. I tried several idea, but I could not find the version which was accepted by the compiler. :)

I found a similar question where the solution looked like this: `&m_b.*m_b.FooFunctionOfB` and at this point I gave it up. 

If anybody has some idea, pleas do not hesitate to share with me.

I am using C++ but not C++0x AND I am forced to avoid stl and boost.