1.说明,需要借助于CStringA类作为中间转换一下,我定义函数如下 std::string CSendEmail::CString2string(CString &str) { if(str.IsEmpty()) return 0; CStringA strA; std::string strs; strA = str.GetBuffer(0); str.ReleaseBuffer(); strs = strA.GetBuffer(0); strA.ReleaseBuffer(); return strs; }
|
|
来自: 成长中辉煌 > 《201306-字符、文件》