2012-01-27

reserve() in STL

vector v;

int size = 100;

v.reserve(size); // No
v.reserve(sizeof(double) * size); // Yes

No comments:

Post a Comment