wstring CString2wstring(CString cstrText)
{
wstring strText = cstrText.GetBuffer(0);
}
string CString2string(CString cstrText)
{
string strText;
strText = CT2CA(cstrText.GetBuffer(0));
return strText;
}
CString string2CString(string strText)
{
CString cstrText;
cstrText = CA2CT(strText.c_str());
cstrText += _T("\n");
return cstrText;
}
————————————————
版权声明:本文为CSDN博主「峻林」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/u012519333/article/details/17279325
char*、string、CString、LPTSTR 的相互转化 wsprintf的正确使用
最新推荐文章于 2021-09-02 20:09:45 发布