Your welcome, careful the last two line isn't c++ code, i said it in c++ style, just to make an example.

And for your Base class write a destructor and declare it virtual (so the objects get destroyed properly no mater what object the Base pointer points to)