#include <memory>
#include <vector>
#include <string>
#include <iostream>
#include <cstdio>

class Hoge {
public:
  std::string s;
  Hoge() { s = "abcdef"; }
  Hoge(int i) {
    char buf[5];
    std::sprintf(buf, "%d", i);
    s = std::string("abcdef") + buf;
  }
  Hoge(const std::string& str) { s = str; std::cout <<"set: " << s << std::endl; }
  ~Hoge() { std::cout<<"del: "<< s << std::endl; }
  void out() { std::cout <<"func: "<< s << std::endl; }
};

typedef std::vector<std::unique_ptr<Hoge>> Vuh;

Vuh getHogeArr() {
  const int N = 100;
  Vuh vHoge;

  for (int i = 0; i < N; i++)
    vHoge.push_back(std::unique_ptr<Hoge>(new Hoge(i)));

  return vHoge;
}

int main()
{
  Vuh v = getHogeArr();

  for (auto& i : v)
    i->out();
}
