The key thing to remember about C++ strings is that they are mutable objects representing text as a sequence of Unicode characters (letters, digits, punctuation, etc.).
Manipulating a string can be be done by calling one of its methods. C++ strings are not immutable and their value can be changed after definition.
A string is delimited by double quotes ("
) characters. Some special characters need escaping using the backslash (\
) character.
Finally, there area many ways to concatenate a string. The simplest one is by using the +
operator. For any string formatting more complex than simple concatenation sprintf
is preferred.