📅  最后修改于: 2022-03-11 14:44:50.841000             🧑  作者: Mango
std::vector vec1;
vec1.reserve(30); // Allocate space for 30 items, but vec1 is still empty.
std::vector vec2;
vec2.resize(30); // Allocate space for 30 items, and vec2 now contains 30 items.