title: Vector of class within a class, how to restrict it for only 1 time?
body: <p>I have a:</p>
  
  <pre><code>class galaxy
  {
  private:
      std::string type;
      double mass;
      std::vector&lt;galaxy&gt; satellites;
  public: 
  //things here
  };
  </code></pre>
  
  <p>So a galaxy can have satellites which are themselves galaxies. But if I do it this way then satellites would have satellites themselves.</p>
  
  <p>Do I have to create another class exactly with the same properties except the vector of galaxies? Or is there another better approach?</p>