#include <iostream>
using namespace std;

class Abstract {
public:
			Abstract( void ) { cout << "Abstract constructor" << endl; };
	virtual	~Abstract( void ) {};
	void	Foo( void ) { cout << "Abstract::Foo()"<< endl; };
};

class Derived: public Abstract {
public:
			Derived( void ): Abstract() { cout << "Derived constructor" << endl; };
			~Derived( void ) {};
	void	Foo( void ) { cout << "Derived::Foo()"<< endl; };
};

void Bar( Derived obj ) {
	obj.Foo();
}

int main(void) {
	Derived X;
	Bar ( X );
    return 0;
}