char temp[4];
CString str = _T("23");
char* pchar = str.GetBuffer(0);
strcpy(temp,pchar);
如果是unicode编码的话,用这个
char temp[4];
CString str = _T("23");
USES_CONVERSION; char* pchar = _T("");
pchar = W2A(str);
strcpy(temp,pchar);
char temp[4];
CString str = _T("23");
char* pchar = str.GetBuffer(0);
strcpy(temp,pchar);
char temp[4];
CString str = _T("23");
USES_CONVERSION; char* pchar = _T("");
pchar = W2A(str);
strcpy(temp,pchar);
转载于:https://my.oschina.net/ypimgt/blog/88238