When shortening a std::string there are basically two possibilities: string.resize(length) or string.erase(length).
std::string
string.resize(length)
string.erase(length)
Given that we know a string will become smaller, what are the differences between the two?
Aucun commentaire:
Enregistrer un commentaire