zl程序教程

您现在的位置是:首页 >  其它

当前栏目

stl vector清理多余的空间

空间 清理 STL vector 多余
2023-09-14 09:07:06 时间

上代码:

vector<int>v;
    v.push_back(1);
    v.reserve(1000);
    qDebug()<<v.capacity