摘要: map(映射) \ multimap(多映射) 红黑树(数据结构 ) 基本操作 insert: 4种方法 count和find erase:3重方法 ***注意:不能通过find进行修改! #include <iostream> #include <map> #include <string> us 阅读全文
posted @ 2015-03-02 18:49 SandKing 阅读(5) 评论(0) 推荐(0)
摘要: 来至: http://tenaclock.iteye.com/blog/789616 另:可参考 http://justmei.blog.163.com/blog/static/1160998532011631104911873/ 打开 cygwin 一、首先检查一下必备的工具包。用以下命令来检查, 阅读全文
posted @ 2015-03-02 18:14 SandKing 阅读(50) 评论(0) 推荐(0)
摘要: s.compare(s2) s.compare(pos1,n1,s2) s.compare(pos1,n1,s2,pos2,n2) s.compare(pos1,n1,cp) s.compare(pos1,n1,cp,n2) #include <iostream> #include <string> 阅读全文
posted @ 2015-03-02 17:11 SandKing 阅读(2) 评论(0) 推荐(0)
摘要: s.find(args) 严格匹配查找 s.rfind(args) 严格匹配查找 s.find_first_of(args, pos) 查找任意匹配字符,从pos开始找, s.find_last_of(args, pos) s.find_first_not_of(args) 查找任意不匹配字符 s. 阅读全文
posted @ 2015-03-02 16:48 SandKing 阅读(6) 评论(0) 推荐(0)
摘要: 1.三个substr重载函数 2.六个append重载函数 3.十个replace重载函数 #include <iostream> #include <string> using namespace std; int main( int argc, char **argv ) { string s( 阅读全文
posted @ 2015-03-02 15:59 SandKing 阅读(9) 评论(0) 推荐(0)
摘要: s.insert( itr, t ) s.insert(pos, n, c) s.insert( itr, n, t ) s.insert(pos, s2) s.insert( itr, b, e ) s.insert(pos, s2, pos2, len) s.assign(b, e) s.ins 阅读全文
posted @ 2015-03-02 15:25 SandKing 阅读(5) 评论(0) 推荐(0)
摘要: string s string s(s2) string s("value") string s(n, 'c') string s(b, e) string s(cp, n) string(s2, pos2) string(s2, pos2, len2) #include <iostream> #i 阅读全文
posted @ 2015-03-02 14:25 SandKing 阅读(7) 评论(0) 推荐(0)
摘要: 1.顺序容器 vector的优点和缺点 缺点: 插入数据时候慢(数组容量不够时,涉及到数组的移动,复制) 删除中间某元素时慢( 涉及元素的移动 ) 优点:排序比较快 sort( vec.begin(), vec.end() ) --快速排序 可以进行快速查找 binary_search( vec.b 阅读全文
posted @ 2015-03-02 12:49 SandKing 阅读(4) 评论(0) 推荐(0)