📜  标准向量 c++ 代码示例

📅  最后修改于: 2022-03-11 14:44:50.526000             🧑  作者: Mango

代码示例1
Vector functions in C++
 --------------------
 clear()  // remove all the elements of the vector container
 insert()  // Inserts new elements before the element at the specified position
 emplace()  // Extends the container by inserting new element at position
 erase()   // Remove elements from a container from the specified position or range
 push_back()  // Push the elements into a vector from the back
 emplace_back() // Constructs an element in-place at the end  
 pop_back()  // Pop or remove elements from a vector from the back   
 resize()  // Changes the number of elements stored     
 swap() // Swap the contents of one vector with another vector of same type. Sizes may differ.