From fe0373797b622204d65a9a6cfc98c1522c7e7f88 Mon Sep 17 00:00:00 2001 From: sah-pinocchio <44533420+sah-pinocchio@users.noreply.github.com> Date: Sun, 23 Jun 2019 07:53:42 +0430 Subject: [PATCH] add member function "at" (#30838) --- guide/english/cplusplus/vector/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/guide/english/cplusplus/vector/index.md b/guide/english/cplusplus/vector/index.md index b01aff7dd3e..fe764fa5bce 100644 --- a/guide/english/cplusplus/vector/index.md +++ b/guide/english/cplusplus/vector/index.md @@ -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. ```