Standard C++ Library Class Reference

less one.
Member Functions
template <class InputIterator>
void
assign (InputIterator first, InputIterator last);
Erases all elements contained in self, then inserts new elements from the range [first, last).
template <class Size, class T>
void
assign (Size n, const T& t);
Erases all elements contained in self, then inserts n instances of the default value of type T.
template <class Size, class T>
void
assign (Size n, const T& t);
Erases all elements contained in self, then inserts n instances of the value of t.
reference
at(size_type n);
Returns a reference to element n of self. The result can be used as an lvalue. The index n must
be between 0 and the size less one.
const_reference
at (size_type) const;
Returns a constant reference to element n of self. The index n must be between 0 and the size
less one.
reference
back ();
Returns a reference to the last element.
const_reference
back () const;
Returns a constant reference to the last element.
size_type
capacity () const;
Returns the size of the allocated storage, as the number of elements that can be stored.
void clear () ;
Deletes all elements from the vector.
bool
empty () const;
Returns true if the size is zero.