Data Information, Constructors, and So On

Constructors can be described in terms of the effects they have. Because the private portions of a class can be implementation-dependent, these effects should be described in terms of information available as part of the public interface. Table F.1 lists several methods whose return values can be used to describe the effects of constructors and of other methods. Note that much of the terminology is from the STL.

Table F.1. Some string Data Methods
Method Returns
begin() An iterator to the first character in a string (also available in a const version, which returns a const iterator).
end() An iterator that is the past-the-end value (also available in a const version).
rbegin() A reverse iterator that is ...

Get C++ Primer Plus, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.