#include <iostream>
#include <vector>
#include <memory>

struct Customer
{
	Customer(const char* name_, int i_, int j_)
		: m_name(name_), m_i(i_), m_j(j_) {}
	~Customer()
	{
		std::cout << "~Customer(" << m_name << ")\n";
	}

	const char* m_name;
	int m_i, m_j;

	const char* getName() const noexcept { return m_name; }
	int getPhone() const noexcept { return m_i; }
	int getID() const noexcept { return m_j; }
};

int main()
{     
	std::vector<std::unique_ptr<Customer>> customers;

	customers.emplace_back(std::make_unique<Customer>("Andy", 123, 111));
	customers.emplace_back(std::make_unique<Customer>("Bob", 124, 222));
	customers.emplace_back(std::make_unique<Customer>("Chris", 125, 333));

	for (auto& ptr : customers) {
		std::cout << ptr->getName() << "\n";
		std::cout << ptr->getPhone() << "\n";
		std::cout << ptr->getID() << "\n";
		std::cout << "\n";
	}

	// remove the first customer
	std::cout << "pop:\n";
	customers.erase(customers.begin());

	// remove the rest
	std::cout << "clear:\n";
	customers.clear();
}