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 );

posted @ 2009-12-14 16:17  傲衣华少  阅读(200)  评论(0编辑  收藏  举报