![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C/C++/VC++
阿友
这个作者很懒,什么都没留下…
展开
-
VC++数据类型转换大全
一、其它数据类型转换为字符串短整型(int)itoa(i,temp,10); //将i转换为字符串放入temp中,最后一个数字表示十进制 itoa(i,temp,2); //按二进制方式转换长整型(long)ltoa(l,temp,10);浮点数(float,double)用fcvt可以完成转换,这是MSDN中的例子: int decimal, sign; ch转载 2009-12-02 10:54:00 · 331 阅读 · 0 评论 -
ConvertCStringToFloat函数(VS2010测试通过)
<br />void ConvertCStringToFloat(CString strBuf, float &fTemp )<br />{<br />int nLength = strBuf.GetLength();<br /> int nBytes = WideCharToMultiByte(CP_ACP,0,strBuf,nLength,NULL,0,NULL,NULL); <br /> char* pContentBuff = new char[ nBytes + 1];<br /> memset(原创 2011-04-29 09:44:00 · 519 阅读 · 0 评论