vector怎么提前预分配一些容量呢

vector有一个方法reserve,参数为n,用来预分配总容量n。

原文地址:https://www.cnblogs.com/wanmeishenghuo/p/13598391.html