Container of a class with a container of a class

Say you had a couple classes like the following:
1
2
3
4
5
6
7
8
class Basic;

class Intermediate{
   public:
   /*some functions*/
   private:
      std::vector<Basic> data;
};


And then you wanted to store Intermediate class objects in another container like:
1
2
3
4
5
6
class Final{
   public:
   /*some functions*/
   private:
      std:vector<Intermediate> superdata;
};


Because the Intermediate object can grow from its container member, would this be a valid situation to change superdata to a container of pointers?
Nope
Topic archived. No new replies allowed.