To append more than one character at a time, refer to either member append or operator+= .
Parameters
- c
- Character to be appended
Return Value
noneExample
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
This example reads an entire file character by character, appending each character to a string object using push_back.
Basic template member declarations
( basic_string<charT,traits,Allocator> ) |
See also
| string::operator+= | Append to string (public member function) |
| string::append | Append to string (public member function) |
| string::operator= | String assignment (public member function) |
| string::insert | Insert into string (public member function) |
| string::replace | Replace part of string (public member function) |
| string::end | Return iterator to end (public member function) |
