![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
lin_xiaochong
这个作者很懒,什么都没留下…
展开
-
C++下实现形成文本的一种方法
将FLOAT型转换成字符型:FLOAT angle=100;char sendBuf[50];sprintf(sendBuf,"%s",angle);形成文本方法:#include "fstream"using namespace std;ofstream file("anglefile.txt");file file.close();原创 2015-08-08 20:29:26 · 194 阅读 · 0 评论 -
C++中数字与字符串之间的转换
C++中数字与字符串之间的转换1、字符串数字之间的转换(1)string --> char * string str("OK"); char * p = str.c_str();(2)char * -->string char *p = "OK"; string str(p);(3)char * -->CString c转载 2015-08-08 20:48:25 · 171 阅读 · 0 评论