如: int temp = 5; CString str; str.Format("%d",temp); 如果temp是double,或temp是float:str.Format("%f",temp); 反过来字符串转为int: temp = atoi(str); 如果是double,float temp = atof(str);
如何将int 转换为 Cstring 类型
最新推荐文章于 2023-12-20 18:28:12 发布
如: int temp = 5; CString str; str.Format("%d",temp); 如果temp是double,或temp是float:str.Format("%f",temp); 反过来字符串转为int: temp = atoi(str); 如果是double,float temp = atof(str);