October 2011
Beginner to intermediate
1200 pages
35h 33m
English
Several methods deal with memory—for example, clearing memory contents, resizing a string, or adjusting the capacity of a string. Table F.2 lists some memory-related methods.
Table F.2. Some Memory-Related Methods

There are four methods for accessing individual characters, two of which use the [] operator and two of which use the at() method:
reference operator[](size_type pos);const_reference operator[](size_type pos) const;reference at(size_type n);const_reference at(size_type n) const;
The first operator[]() method allows you to access an individual element of a string by using array notation; it can be used ...
Read now
Unlock full access