Function |
Expression |
C.assign (Beg,end) C.assign (N,elem) |
assigns the data in the [beg; end] interval to c. assigns a copy of n elem to c. |
c.at (IDX) |
Returns the index IDX refers to the data, if the IDX is out of bounds, throws Out_of_range. |
C.back () |
Returns the last data without checking to see if the data exists. |
C.begin () |
Returns a data that is valued by the iterator. |
C.capacity () |
Returns the number of data in the container. |
C.clear () |
Removes all data from the container. |
C.empty () |
Determines whether the container is empty. |
C.end () |
Points to the last data address in the iterator. |
C.erase (POS) C.erase (Beg,end) |
Deletes data from the POS location and returns the location of the next data. Delete the data from the [Beg,end] interval and return to the location of the next data. |
C.front () |
Returns the first data. |
Get_allocator |
Use the constructor to return a copy. |
C.insert (Pos,elem) C.insert (Pos,n,elem) C.insert (Pos,beg,end) |
inserts a elem copy at the POS location and returns the new data location. inserts n elem data at the POS location . no return value. inserts the data in the [Beg,end] interval at the POS location. no return value. |
C.max_size () |
Returns the maximum number of data in a container. |
C.pop_back () |
Delete the last data. |
C.push_back (Elem) |
Add a data to the trailer. |
C.rbegin () |
Returns the first data for a reverse queue. |
C.rend () |
Returns the next position of the last data in a reverse queue. |
C.resize (num) |
Re-specify the length of the queue. |
C.reserve () |
Keep the appropriate capacity. |
C.size () |
Returns the number of actual data in the container. |
c1.swap (C2) swap (C1,C2) |
Swaps c1 and c2 elements. The same action. |
Vector<elem> C Vector <Elem> C1 (C2) Vector <Elem> C (n) Vector <Elem> C (n, Elem) Vector <Elem> C (beg,end) c.~ Vector <Elem> () |
Create an empty vector. Copy a vector. Create a vector that contains n data, and the data is constructed by default. Create a vector containing n elem copies . Create a vector with an interval of [Beg;end] . Destroys all data and frees up memory. |