日常笔记
文章平均质量分 67
汤的Blog
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
string转化为int
方法一:std::string str = "123";int n =atoi(str.c_str()); intx=static_castint>(atof(s.c_str()));atof函数:功 能: 把字符串转换成浮点数 用 法: double atof(const char *nptr); atoi函数:功 能: 把字符串转换成长整原创 2016-06-02 21:42:19 · 577 阅读 · 0 评论 -
C++中的string类的用法
要想使用标准C++中string类,必须要包含#include // 注意是,不是,带.h的是C语言中的头文件using std::string;using std::wstring;或using namespace std;下面你就可以使用string/wstring了,它们两分别对应着char和wchar_t。string和wstri转载 2016-07-20 11:21:23 · 269 阅读 · 0 评论
分享