I created a type, which is a list of priority queues of strings (not my idea, I have to do it):
typedef list<priority_queue<string>> L; L myList; Now I need to create a class M, which will inherit from this type. From what I acknowledged, I need to use templates to do so, but I still have no idea how to do it and I haven't found anything online.
How do I make a class inherit from a type?
std::list,std::priority_queue, andstd::string, or are they your own versions? If the former, why do you need to inherit from them? Inheriting from standard library types isn’t illegal, but a lot of people seem to consider it a bad idea. And why are you having trouble; it should be no different from any other inheritance.myList; only from a class type.LL, at least something likeQueueContainerwhich tells you that it contains queues.