new member function (#23146)

* new member function

* Fixed formatting
This commit is contained in:
Akshat Tripathi
2018-11-16 15:14:15 +05:30
committed by Manish Giri
parent 7e2c6a6767
commit 8feb48aab9

View File

@ -127,6 +127,8 @@ std::vector.front(); // returns the first element of the vector.
std::vector.back(); // returns the last element of the vector. std::vector.back(); // returns the last element of the vector.
std::vector.push_back(n); // inserts the element "n" to the end of the vector. std::vector.push_back(n); // inserts the element "n" to the end of the vector.
std::vector.pop_back(n); // removes the last element of the vector std::vector.pop_back(n); // removes the last element of the vector
std::vector.resize(n); // resizes a vector so that it contains the specified number of elements.
std::vector.assign(i,n); // assigns new contents to the vector and replaces its current contents.
``` ```
### Vector Iterator ### Vector Iterator