This question already has an answer here:
Suppose that I have two classes named Object and ObjectManager respectively. the Object class is used for describing an object and the ObjectManagaer class function as the manager of the Object class, it allocates and releases memory for Objects, it has a container that stores the allocated objects.
The problem is, if I write a new class subobject derived from Object,and I also want to use an ObjectManager to manager the subobjects, then how can I put the subobject into the container ?
Aucun commentaire:
Enregistrer un commentaire