August 2012
Intermediate to advanced
976 pages
30h 17m
English
stringsAlong with defining how objects are created and initialized, a class also defines the operations that objects of the class type can perform. A class can define operations that are called by name, such as the isbn function of our Sales_item class (§ 1.5.2, p. 23). A class also can define what various operator symbols, such as << or +, mean when applied to objects of the class’ type. Table 3.2 (overleaf) lists the most common string operations.
Table 3.2. string Operations
stringsAs we saw in
Read now
Unlock full access