CString与string相互转换

来源:互联网 发布:2016淘宝不能刷单了 编辑:程序博客网 时间:2024/06/16 17:43

CString转string 例子:

CString strMfc = "test";std::string strStr;strStr = strMfc.GetBuffer(0);

string转CString 例子:

CString strMfc;string strStr = "test";strMfc = strStr.c_str();