22.4 — std::string character access and conversion to C-style arrays

Character access There are two almost identical ways to access characters in a string. The easier to use and faster version is the overloaded operator[]: There is also a non-operator version. This version is slower since it uses exceptions to check if the nIndex is valid. If you are not …