#include <boost/ptr_container/ptr_vector.hpp>
#include <vector>

class Animal
{
public:
    virtual Animal* clone() const = 0;
    virtual char type() = 0;
};

Animal* new_clone(Animal const& other){
  return other.clone();
}

class Cat : public Animal
{
public:
    Cat* clone() const{ return new Cat(*this); }
    char type() { return 1; }
};

class Zoo
{
public:
    boost::ptr_vector<Animal> animals;
};

int main()
{
    std::vector<Zoo> allZoos;

    Zoo ourCityZoo;
    ourCityZoo.animals.push_back(new Cat());

    allZoos.push_back(ourCityZoo);
    allZoos.clear();

    return 0;
}
