Sorting objects by a common attribute is fairly straightforward but what if one had to :
-
sort a base container of base & derived objects by type, for example, derived objects will be grouped together and vice versa for base objects.
-
sort a base container of base & derived objects by an attribute that only exists in the derived object.
Apart from storing the objects separately, what other ways are there?
Aucun commentaire:
Enregistrer un commentaire