• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
狗窝
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

2009年5月6日

C++中获得string的子串
摘要: 例子[代码] 结果 ifbasic_string substr(size_type pos = 0, size_type n = npos) const; The member function returns an object whose controlled sequence is a copy of up to n elements of... 阅读全文
posted @ 2009-05-06 18:42 疯狗残云 阅读(31090) 评论(0) 推荐(0)
 
C++中将string转换为int
摘要: C语言库函数名: atoi  功 能: 把字符串转换成整型数  函数说明: atoi()会扫描参数nptr字符串,检测到第一个数字或正负符号时开始做类型转换,之后检测到非数字或结束符 \0 时停止转换,返回整型数。  原型: int atoi(const char *nptr);  需要用到的头文件: #include <stdlib.h>  程序例:  1)  #include &l... 阅读全文
posted @ 2009-05-06 18:37 疯狗残云 阅读(56460) 评论(1) 推荐(0)
 
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3