2010-09-15 7 views

Répondre

4

Essayez ceci - pour exemple: - Si 'x' est votre tableau d'octets puis -

BYTE x[5]; 
x[0] = 'A'; 
x[1] = 0; 
x[2] = 'B'; 
x[3] = 'C'; 
x[4] = 0; 

CString str((LPCSTR) &x, sizeof(x)); 
0
BYTE x[5]; x[0] = 'A'; x[1] = 'B'; x[2] = 'C'; x[3] = 'D'; x[4] = '0'; 

CString str = TEXT(""); 
CString s; 
for(int i=0;i<5;i++) 
{ 
    str.Format(L"%C",x[i]); 
    s += str; 
} 

AfxMessageBox(s); 
Questions connexes