Store pointers to memberfunctions of different classes
<p>I am trying to store pointers to memberfunctions of <em>different</em> Classes in C++. What are the possibilities in C++?</p>

<p>I would like to do this:</p>

<pre><code>class A {
    T0 f(T1,T2);
};

class B {
    T0 g(T1,T2);
    T0 h(T1,T2);  //interfaces cant be used since the number of functions per class differs.
};

typedef WHATTOPUTHERE type;

type x;
x = A::f;
x = B::h;
</code></pre>

<p><strong>Update:</strong> Another Problem is that the code should be continueable like this:</p>

<pre><code>B myB;
myB::x(a,b); //not sure about the syntax, should result in myB::h(a,b) being called
</code></pre>

<p>This means that I can <em>not</em> bind at the time I store the pointer, since the instance does not exist (yet).</p>
