摘要: double x=1.1; cout<<int(x+0.5)<<endl; double PI = atan(1.0) * 4; 阅读全文
posted @ 2018-12-18 20:08 莫莫君不恋爱 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 1.c_str()的用法: C中没有string,所以函数c_str()就是将C++的string转化为C的字符串数组,c_str()生成一个const char *指针,指向字符串的首地址。 2.字符串转整型: 1. 2. 3.字符串转浮点型: 阅读全文
posted @ 2018-12-18 20:06 莫莫君不恋爱 阅读(722) 评论(0) 推荐(0) 编辑