string 转 int,int 转 string
2016-03-18 22:53
197 查看
string str="12345";
int b=atoi(str.c_str());
可以配合atof,转为double
int b=atoi(str.c_str());
可以配合atof,转为double
char
buf[10];
sprintf
(buf,
"%d"
, 100);
string b = buf;
相关文章推荐
- AlphaGo 4:1 李世石
- iOS开发——Swift & Xcode
- C语言类型提升
- nsoj A. Oil Deposits
- Setting Up WS2016 Storage Spaces Direct SOFS
- 汇编与高级语言(插图结合Delphi代码,来自linzhengqun)
- JUnit 3.8 演示递归删除文件目录的 测试类程序 .
- IOS NavigitionController导航栏的基本设置
- txt中的内容复制到excel中无法对齐, 该怎么处理?
- ubuntu15.10安装mac主题
- HDOJ 1198 Eddy's picture 最小生成树
- 高压缩文件是如何实现的
- 图片的放大,缩小,还原。
- JS浮点数运算BUG破法
- google方程式
- Java 被访问时报 the method getDispatcherType() is undefined for the type HttpServletRequest
- 北化oj 2101 - 程序改错 - 两数交换(二)
- 归并排序
- centos7 无线网卡驱动的安装及无线网络的配置
- self.x和_x区别