C++ String operator+=()
This function is used to extend the string by appending new characters at the end of the string.
Consider two strings str1 and str2. Syntax would be :
str2: str2 is a string object which is to be appended.
s: s is a pointer to the null terminated sequence of characters.
ch: ch is a character which is to be appended to the current value of the string.
It returns *this.
Let’s see a simple example.
Let’s see another simple example.
Let’s see a simple example by passing single character value.
Let’s see this example.
Next TopicC++ Strings