Standard C++ Library Class Reference
must be between 0 and the size less one.
const_reference operator[] (size_type n) const;
Returns a constant reference to element n of self. The index n must be between 0 and the
size() - 1.
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);
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() - 1.
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() - 1.
reference
back ();
Returns a reference to the last element.
const_reference
back () const;
Returns a constant reference to the last element.
void
clear ();