'C++ How to inherit base class declared in the derived class?

I'm having a problem with using C++ inheritance and was wondering if anybody could help.

I want to declare a class List derived from std::vector<Entry>, where the class Entry is a nested class declared inside the List class (to limit access and clear class naming).

I've tried this following code:

class List : public std::vector<List::Entry> {
  class Entry { /* ... */ };
}

But an error occurs in this code:

No member named 'Entry' in 'List'



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source