#include <iostream>
using namespace std;

class Container;

class F
{
public:
    typedef void (Container::*FuncPtr)();
    
    F(Container &c, FuncPtr fp) : m_c(c), m_fp(fp) {}
    void Execute() { (m_c.*m_fp)(); }
private:
    Container& m_c;
    FuncPtr m_fp;
};

class Container
{
public:
    Container() : fps(*this, &Container::Func) { }
    void Func() { cout << "hello from Container::Func()" << endl; }
    void Execute() { fps.Execute(); }
private:
    F fps;
};

int main() {
	Container c;
	c.Execute();
	return 0;
}