c++ int转字符串 char转字符串
代码
第一种
int a = 111;
char b[20];
itoa(a,b,10);
xxx.SetWindowText(CString(b));
第二种
int a = 111;
TCHAR b[20]={0};
_itot(a,b,10);
xxx.SetWindowText(b);
第三种
CString str;
str.Format(_T("%d"), a);
SetWindowText(str);
int a = 111;
char b[20];
itoa(a,b,10);
xxx.SetWindowText(CString(b));
第二种
int a = 111;
TCHAR b[20]={0};
_itot(a,b,10);
xxx.SetWindowText(b);
第三种
CString str;
str.Format(_T("%d"), a);
SetWindowText(str);

浙公网安备 33010602011771号