怎么将CString类型的数字字符串转化浮点型?

[复制链接]
查看11 | 回复2 | 2009-8-12 15:06:39 | 显示全部楼层 |阅读模式
如果是VC6用 atof如果是VS2005或VS2008用 _tstof (单字符集和UNICODE编码都可以用) CString str = _T("123.456"); //VS2005或VS2008用 double a = _tstof(str); //VC6用 double b = atof(str);...
回复

使用道具 举报

千问 | 2009-8-12 15:06:39 | 显示全部楼层
使用函数double atof( const char *string );比如char *s; double m;m=atof(s );//把s数字字符串转换为double 这是在#include的...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行