diff --git a/lectures/01_introduction/README.md b/lectures/01_introduction/README.md index 6182fb5..0eb86d8 100644 --- a/lectures/01_introduction/README.md +++ b/lectures/01_introduction/README.md @@ -274,7 +274,7 @@ object. There are several ways of constructing string objects: 3. Reading stops either at the end of the input or upon reaching the next white-space character (without reading it in). - The (overloaded) operator ’+’ is defined on strings. It concatenates two strings to create a third string, without changing either of the original two strings. - The assignment operation ’=’ on strings overwrites the current contents of the string. -- The individual characters of a string can be accessed using the subscript operator [] (similar to arrays). +- The individual characters of a string can be accessed using the subscript operator [] (similar to arrays). – Subscript 0 corresponds to the first character. – For example, given std::string a = "Susan"; Then a[0] == 'S' and a[1] == 'u' and a[4] == 'n'. - Strings define a special type string::size_type, which is the type returned by the string function size()