如何在 C++ 中声明 wstring 或 wchar_t 字面量
要声明 wstring 字面量,使用 L 前缀:
wstring-literal.cpp
wstring w = L"Test: äöü";要声明 wchar_t 字面量,你也可以使用 L 前缀:
wchar-literal.cpp
wchar_t wc = L'ö';Check out similar posts by category:
C/C++
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow