如何将float类型转化为CSting 类型的。用什么函数啊????????????
解决方案 »
- 注册DLL
- 没分了,求帮我下个资源
- 怎样用JRTPLIB库实现一个数据中转服务器?
- 求教:如何给动态空间数组关联变量
- 使用组合框遇到的问题,新手,大家多多帮忙!
- mac和pc开发,那一个更有前途?周一就要分组了,各位高手给小弟出个主意~同时散分~!大家都来说说~!斑竹不要删啊~
- 请问:如何将一个CStringList对象转化为char[],通过tcp/ip传输之后再还原为原来的CStringList
- 请问ado编程中的recordset的addnew方法如何使用
- 有没有好的学习网站 ?
- 兄弟们,一个DRW图像文件,谁来分析下,改怎么打开!!
- 求圆形的BMP图片按扭(BUTTON)的MFC源代码
- 求教dll项目中外来库文件与默认库冲突的问题。谢谢大家了
float ft;
str.Format("%f",ft);
¶ÌÕûÐÍ(int)
itoa(i,temp,10);///½«iת»»Îª×Ö·û´®·ÅÈëtempÖÐ,×îºóÒ»¸öÊý×Ö±íʾʮ½øÖÆ
itoa(i,temp,2); ///°´¶þ½øÖÆ·½Ê½×ª»»
³¤ÕûÐÍ(long)
ltoa(l,temp,10);
int value,
char *string,
int radix
);
char *_i64toa(
__int64 value,
char *string,
int radix
);
char * _ui64toa(
unsigned _int64 value,
char *string,
int radix
);
wchar_t * _itow(
int value,
wchar_t *string,
int radix
);
wchar_t * _i64tow(
__int64 value,
wchar_t *string,
int radix
);
wchar_t * _ui64tow(
unsigned __int64 value,
wchar_t *string,
int radix
);
Parameters
value
Number to be converted.
string
String result.
radix
Base of value; must be in the range 2 – 36.
Return Value
Each of these functions returns a pointer to string. There is no error return.
CString str;
float ft;
str.Format("%f",ft);
最好。这就是“格式转换”嘛!
对不对?
ITOA是到字符串
float ft;
str.Format("%f",ft);
-------------------------------------------------------------
这个就行呀
这是一个思路。
----------------------------------------------------
相信明天!快给我分,不然我抢的啦^_^
----------------------------------------------------
时光.漫步