字符串 CString转换 unicode 中文 wcout 输出

1、unicode字符集下输出CString:

wcout.imbue(locale("chs"));
wcout << str.GetString() << endl;

2、unicode字符集下CString 与string的转换(提醒:存在个wstring)

\CString->string:
USES_CONVERSION;
W2A(cStr.GetBuffer())
\string->CString
CString cStr(str)
原文地址:https://www.cnblogs.com/wllwqdeai/p/14041855.html