![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
STL
南宮逸辰
喜欢听音乐,ACM旅途中
展开
-
C++ string 转char
string 是c++标准库里面其中一个,封装了对字符串的操作 把string转换为char* 有3中方法: 1。data 如: string str="abc"; char *p=str.data(); 2.c_str 如:string str="gdfd"; char *p=str.c_str(); 3 copy 比如 s转载 2013-02-19 17:43:08 · 402 阅读 · 0 评论 -
c++学习——容器搜索方法(lower_bound, uper_bound)
本文主要是验证,容器搜索算法的使用:lower_bound, uper_bound 验证项目: 1. 当 key > begin 时 lower_bound, uper_bound 取值 2. 当 key 3. 当 key = 容器中的某值(不等于bigin,也不等于end) 时 lower_bound, uper_boudn 取值 4. 当 key 在 不等于容器中任何转载 2013-03-21 21:04:00 · 831 阅读 · 0 评论