C++ wstring轉(zhuǎn)string 和 string轉(zhuǎn)wstring 的一種方法
(認(rèn)知有限,如有不妥,還請(qǐng)告知,歡迎討論)
輸出結(jié)果:
The type of "Hello World" is NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
The type of "Hello World" now is NSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE
The type of "Hello World" now is NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

=END=
=reference=
[1]www.cplusplus.com/reference/locale/wstring_convert/from_bytes/
[2]www.cplusplus.com/reference/locale/wstring_convert/to_bytes/
標(biāo)簽: