随笔分类 - c++
摘要:解析字符串中的固定标志位 正则表达式和iterator的配合应用 #include <string> #include <map> #include <regex> #include <iostream> / /替换\\M+后面的字符 // \\M+195B6 替换为 文 std::regex pa
阅读全文
摘要:解析字符串中的固定标志位 正则表达式和iterator的配合应用 #include <string> #include <map> #include <regex> #include <iostream> / /替换\\M+后面的字符 // \\M+195B6 替换为 文 std::regex pa
阅读全文
摘要:在C++中,std::map和std::list是两种不同的容器类型,前者是基于红黑树实现的关联容器,后者是双向链表。 如果你想比较这两种容器在查找元素上的速度,通常std::map会比std::list快得多。因为std::map的查找操作是平均常数时间复杂度,即O(log n),而std::li
阅读全文