Empty vector of type <stuff*>
- by bo23
I have a vector populated with objects:
std::vector<Stuff*> stuffVector;
and am trying to delete all elements of it using a cleanup function
void CleanUp()
{
for (std::vector<Stuff*>::size_type i = 0 ; i < stuffVector.size() ; i++)
{
stuffVector.erase(stuffVector.begin()+i);
}
cout <<…