#include <iostream>
class A {
public:
	A &	operator=( A const & rhs ) {
		std::cout << "A assignation operator\n";
		_i = rhs._i;
		return *this;}
private:
	int	_i;
};

class B {
public:
	B() {
		std::cout << "B default constructor\n";
		_a = new A();}
	B( A *a ) {
		std::cout << "B parameterized constructor\n";
		_a = new A();
		*_a = *a;}

	~B() {
		std::cout << "B destructor\n";
		delete _a;}
private:
	A	*_a;
};

int	main() {
	{
		const B * b = new B();
		delete b;
	}
	std::cout << "\n";
	{
		B * b;
		A * a = new A();
		b = new B(a);
		delete a;
		delete b;
	}
	return 0;
}
