#include <iostream>
#include <cstdlib>

class A
{
public:
	virtual void Bar()
	{
		std::cout << "A::Bar() -> " << this << std::endl;
	}
	
	virtual void Foo()
	{
		std::cout << "A::Foo() -> " << this << std::endl;
	}	
};

class B
{
public:
	virtual void Foo()
	{
		std::cout << "B::Foo() -> " << this << std::endl;
	}
};

int main()
{
	B* b = reinterpret_cast<B*>( new A );
	b->Foo();	
	return EXIT_SUCCESS;
}
