摘要:
将string|char*转换为wstring|wchar_t*的例子:1、string转换为wstring:stringstr=_T("翔翔糖糖");intsize=MultiByteToWideChar(CP_ACP,0,str.c_str(),-1,NULL,0);wchar_t*ch=newwchar_t[size+1];if(!MultiByteToWideChar(CP_ACP,0,str.c_str(),-1,ch,size)){returnfalse;}wstringwstr=ch;2、char*转换为wchar_t*:char*str=_T("翔 阅读全文