Skip to content

Strings are rows of characters

Read · 1 of 4

A string works like a vector of chars

s.size() is how many characters it has, and s[i] is the character at position i (starting at 0). Each one is a char, so compare with single quotes: s[i] == 'a'.

+ joins strings, and += adds to the end.