c++ CString与string相互转换

CString转string 例子:

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

string转CString 例子:

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

猜你喜欢

转载自blog.csdn.net/dxm809/article/details/114340269