int 转化为其他类型

int i = 1;

int转化为CString cstr;
str.Format("%d",i);

int转化为string str;

int转化为float f;
f = atof((char*)(LPCTSTR)cstr);

int转化为char c;

int转化为char* ch;

int转化为byte by;
BYTE by[4];
memcpy( by, &i, 4 );

原文地址:https://www.cnblogs.com/aoyihuashao/p/1623857.html