my third baby
c++ version dynamic instantiation, to be continued