标签:ring wchar_t form format 报错 i++ mat cstring bsp
char*转化为CString
CString转化为char *
CString转化为wchar_t *:
wchar_t *pc = cStr.GetBuffer();
BYTE以数值的形式转化为CString,并拼接起来:
CString cStr; BYTE * p3 = new BYTE[3]; *p3 = 1; *(p3+1)=2; *(p3+2)=3; for (int i = 0; i < 3; i++) { CString cStr3; cStr3.Format(L"%02X", *(p3+i)); //一开始报错,加上L就好了 cStr += cStr3; } wcout << "cStr:" << cStr.GetString() << endl; //打印CString,
MFC中char*,string和CString之间的转换(待补充)
标签:ring wchar_t form format 报错 i++ mat cstring bsp
原文地址:https://www.cnblogs.com/Stephen-Qin/p/12186385.html