October 2011
Beginner to intermediate
1200 pages
35h 33m
English
You can append one string to another by using the overloaded += operator or by using an append() method. All throw a length_error exception if the result would be longer than the maximum string size. The += operators let you append a string object, a string array, or an individual character to another string:
basic_string& operator+=(const basic_string& str);basic_string& operator+=(const charT* s);basic_string& operator+=(charT c);
The append() methods also let you append a string object, a string array, or an individual character to another string. In addition, they let you append part of a string object by specifying an initial position and a number of characters to append or else by specifying a range. You ...
Read now
Unlock full access