[Univ of Cambridge] [Dept of Engineering]
next up previous contents
Next: Routines Up: Strings Previous: Iterators

Size

These routines (similar ones exist for other containers) give you size information. reserve() doesn't change size or initialize elements - resize() does. capacity() - size() = reserved size.

// Capacity
   size_type       size() const;
   size_type       length() const;
   size_type       max_size() const;
   void            resize(size_type, charT);
   void            resize(size_type);
   size_type       capacity() const;
   void            reserve(size_type);
   bool            empty() const;



Tim Love
2001-07-05