classe A {
friendclass B;
friendclass C;
virtualint function1()=0;
virtualint function2()=0;
}
class D{
virtualint function3(A *a , x, y)=0;
}
class B: public D{
A * a;
int function3(A* a, x, y);
}
class C: public D{
A * a;
int function3(A *a , x, y);
}