2 Comments

Nice and helpful. What does it make a string to be a "narrow character" string vs a not one?

Expand full comment
author

All string types are instantiations of the std::basic_string template. std::string is std::basic_string<char>. Char is typically 8bit and the standard also offers wide characters in the form of wchar_t (that is officially called a wide character type), which is typically 16bit or 32bit (with the corresponding std::wstring as std::basic_string<wchar_t>).

Expand full comment