// ImInDerived.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include<iostream>
class A
{
public:
A(){};
virtual ~A(){};
};
class B : public A
{
public:
B(){};
~B(){};
int Fb(int a){ return a*a;}
};
typedef int (A::*Myfunction)(int);
int main()
{
B* pB = new B;
Myfunction pf = (Myfunction)(&B::Fb);
int retValue = (pB->*pf)(3);
std::cout<<retValue<<std::endl;
return 1;
}