16,548
社区成员




char a[5] = {0x10,0x20,0x00,0x30};
CString str;
str.Format(TEXT("%02x:%02x:%02x:%02x"), a[0], a[1], a[2], a[3]);
AfxMessageBox(str);
char a[5] = {0x10,0x20,0x00,0x30};
CString str;
str.Format(TEXT("%c:%c:%c:%c"), a[0], a[1], a[2], a[3]);
iLength = MultiByteToWideChar( CP_ACP, 0, pStringIn, -1, NULL, 0 ) ;
pWideStr = new WCHAR[iLength + 1] ;
MultiByteToWideChar( CP_ACP, 0, pStringIn, -1, pWideStr, iLength );
pWideStr[iLength] = 0; // 追加 \0
...
delete[] pWideStr;
char a[] = "123456789";
CString str(a);