I have these classes:
- a Base
class
- a Child
class
which needs more space than Base.
Something like this:
class Base{
};
class Child : Base{
int something;
};
And I define a std::vector
containing Base class instances.
For example: I want to reserve space instead of using push_back()
for every Child object. Is there any solution to resize the vector upon the class Child?