mercredi 25 novembre 2015

Difference between std::string::resize and std::string::erase when shortening string

When shortening a std::string there are basically two possibilities: string.resize(length) or string.erase(length).

Given that we know a string will become smaller, what are the differences between the two?

Aucun commentaire:

Enregistrer un commentaire