其他分享
首页 > 其他分享> > MFC将CString转为char型数组

MFC将CString转为char型数组

作者:互联网

char pFileName[MAX_PATH];
memset(pFileName,0,MAX_PATH);
CString CpFile;
WCHAR *pTemp = CpFile.GetBuffer();
::WideCharToMultiByte( CP_ACP,0,pTemp,-1,pFileName,MAX_PATH,NULL,NULL );

标签:MFC,MAX,CString,char,PATH,NULL,pFileName
来源: https://blog.csdn.net/weixin_40385285/article/details/94611306