VS默认是宽字符集,使用以下办法成功解决问题
CString cstr;
USES_CONVERSION;
String str(W2A(cstr));
CString to String
String str;
CString cstr(str.c_str());
VS默认是宽字符集,使用以下办法成功解决问题
CString cstr;
USES_CONVERSION;
String str(W2A(cstr));
CString to String
String str;
CString cstr(str.c_str());