Element Access
Accessing a character in a string is very easy and similar to element access in arrays.
Access to the elements of a string str
is very convenient because the strings support random access iterators. We can access with str.front()
the first character and with str.back()
the last character of the string. With ...