title: C++ How to make a vector with a class type pointer
body: <p>So basically I want to make a vector called</p>
  
  <pre><code>  vector &lt;Employee&gt; *EmployeeDB;
    Employee *temp;
  </code></pre>
  
  <p>and I want to put this inside </p>
  
  <pre><code>  temp = new Manager(first, last, salary, meetings, vacations);
    EmployeeDB-&gt;push_back(*temp);
  </code></pre>
  
  <p>oh I am using inheritance and polymorphism, which is why the new is Manager type.</p>
  
  <p>P.S I forgot, The parent class is the Employee and it has 3 subclass which inherits the parents class. 3 subclass are manager, researcher and engineer class.</p>