问题:
I am not able to understand the differences between std::string and std::wstring . 我无法理解std::string和std::wstring之间的区别。 I know wstring supports wide characters such as Unicode characters. 我知道wstring支持宽字符,例如Unicode字符。 I have got the following questions: 我有以下问题:
- When should I use
std::wstringoverstd::string? 什么时候应该在std::string使用std::wstring? - Can
std::stringhold the entire ASCII character set, including the special characters?std::string容纳整个ASCII字符集,包括特殊字符吗? - Is
std::wstringsupported by all popular C++ compilers? 所有流行的C ++编译器都支持std::wstring吗? - What is exactly a " wide character "? 什么是“ 宽字符 ”?
解决方案:
参考一: https://stackoom.com/question/1geR/std-wstring-VS-std-string参考二: https://oldbug.net/q/1geR/std-wstring-VS-std-string
来源:oschina
链接:https://my.oschina.net/u/4428122/blog/4334824