```int main()
{
vector<int>oo;
for (int i = 0;i < 8;i++)//放入元素
{
oo.push_back(i);
}
oo.insert(oo.begin() + 1, 8);//在位置0和位置1中间(即位置1前)插入元素8
for (int i = 0;i < oo.size();i++)
{
cout << oo[i] << " ";
}
06-01
6万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-18
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-27
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
12-31