Make a clone method in your CFractal class. It will allocate a subclass of CFractal, and return a CFractal* to the allocated type.