您的位置:首页 > 其它

CString(ANSI/Unicode)与string/wstring的安全转换

2013-02-07 16:48 459 查看
CString strSrc("123");
CStringA strSrcA(strSrc);
CStringW strSrcW(strSrc);
const char* p1 = strSrcA;
const WCHAR* p2 = strSrcW;
string strDesA((LPCSTR)strSrcA);
wstring strDesW((LPCWSTR)strSrcW);

                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: