add member function "at" (#30838)
parent
4432a9a2fa
commit
fe0373797b
|
@ -127,6 +127,7 @@ std::vector.front(); // returns the first 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.pop_back(n); // removes the last element of the vector
|
||||
std::vector.at(i); // returns a reference to the element at position i in 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.
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue