CString转换到string:无法从“wchar_t *”转换为“std::basic_string<_Elem,_Traits,_Ax>”
对于你的应用来说
ANSI和UNICODE的区别就是
ANSI编码CString默认是窄字节的
UNICODE默认是宽字节的
std::string总是窄字节的
所以UNICODE下你要做宽窄字节转换
比如可以这样
USES_CONVERSION;
CString str;
std::string str1 = W2A(str.Getbuffer());
str.ReleaseBuffer();