📅  最后修改于: 2022-03-11 14:44:55.674000             🧑  作者: Mango
myVector.resize(row_count, vector(column_count, initialization_value));
//Example1: create a 2D integer vector with 5 rows and 5 columns having "1"
myVector.resize(5, vector(5, 1));
//Ex2
myVector.resize(n);
for (int i = 0; i < n; ++i)
myVector[i].resize(m);