#include <iostream.h>

class B
	{
public:
	void f();
	void g();
	void h();
	};

void B::f() { cout << "B::f()\n"; }

void B::g() { cout << "B::g()\n"; }

void B::h() { cout << "B::h()\n"; }

class D : public B
	{
public:
	void g();
	void h();
	};

void D::g()
	{
	B::g();
	cout << "... called from D::g()\n";
	}

void D::h()
	{
	((B *)(this))->h();
	cout << "... called from D::h()\n";
	}

int main()
	{
	B b;
	b.f();
	b.g();
	b.h();
	D d;
	d.f();
	d.g();
	d.h();
	return 0;
	}

