顺心外套

文章
8
资源
0
加入时间
3年12月2天

c++中vector初始化问题,push_back

在c++中使用vector时一般不会指定它的容量大小,因为vector在运行时能高效快速地添加元素。通常都是开始的时候创建空的vector对象,在运行时再动态添加元素。vector中push_back添加元素时,是在末尾添加。#include <iostream>#include <vector>#include <algorithm>using nam...