dimanche 19 avril 2020

Prototypes Vs New Operatori C++ [closed]

I'm learning design pattern in c++ and now i'm on the prototype pattern. While studying this pattern I couldn't properly find the answer to this question: what's the point of cloning an object instead of creating a new one with the new operator? I assume that cloning objects allows me to create objects without the need of specifing the object state through the class constructor, but what else ?

Thanks for the attention!:)

Aucun commentaire:

Enregistrer un commentaire