当前位置:网站首页>Usage of insert() in vector

Usage of insert() in vector

2022-07-06 16:45:00 HBUcs2020

vector in insert() Functions have the following three uses : 
1、 At a designated location loc The value inserted before is val The elements of , Returns the iterator that points to this element
2、 At a designated location loc Insert before num The values are val The elements of  

3、 At a designated location loc Insert interval before [start, end) All elements of

Specify address insertion value :

v.insert(lower_bound(v.begin(), v.end(), st[top]), st[top]);

 

原网站

版权声明
本文为[HBUcs2020]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202131314583670.html