I understand that .reserve()
reserves memory for the vector without actually modifying its size. But how is this implemented? How can you just reserve memory without allocating it?
EDIT: I'm asking specifically about how to reserve memory without allocating it, not about how std::vector
works in general
Aucun commentaire:
Enregistrer un commentaire