Changed vector<int>::const_iterator to vector<int>::iterator for vector.erase()