I can\'t seem to think of a reliable way (that also compacts memory) to remove the first N elements from a std::vector. How would one go about doing that?
std::vector
v.erase( v.begin(), v.size() > N ? v.begin() + N : v.end() );
Don't forget the check of the size, just in case.