I'm working on a personal project which requires at some point to manage a list of drinks. I planned to manage them by their name and not an ID. hat I first thought is an unordered_set because I do not specifically need them to be sorted alphabetically. I also need to export/import such a list. I have a class:
class DrinkList : public std::unordered_set<Drink>{
public:
void import();
void export();
};
Is it a good idea or should I create a class containing an unordered_set with functions to interact with it ?
If I should keep it the way it is, what should I do as constructor/deconstructor? It is a bit blurry to me :/
Thank you for your help!