11 2017 档案

摘要:工作需要用到C++中的正则表达式,所以就研究了以上三种正则。 一、三种正则的比较 1. C regex /* write by xingming * time:2012年10月19日15:51:53 * for: test regex * */ #include <regex.h> #include 阅读全文
posted @ 2017-11-21 09:57 cloudren2020 阅读(562) 评论(0) 推荐(0)
摘要:仿函数(函数对象)和适配器可以说是STL中默默无闻的贡献者,它们没有容器、算法和迭代器那么有名, 但是其贡献却很大。 一、仿函数 仿函数又称函数对象,从名字上可以得出,它本质上是 一种具有函数特质的对象, 也即可以像使用函数一样使用该对象。怎么样做?重载operator()运算符即可,有了这个运算符 阅读全文
posted @ 2017-11-20 22:08 cloudren2020 阅读(231) 评论(0) 推荐(0)
摘要:/* @note: 学习C++泛型编程 @date: 2017-11-16 @author: cloudren */ #include <iostream> #include <algorithm> #include <string.h> #include <vector> #include <de 阅读全文
posted @ 2017-11-20 21:27 cloudren2020 阅读(131) 评论(0) 推荐(0)
摘要:位段 针对类或结构中unsigned或in... 阅读全文
posted @ 2017-11-20 21:08 cloudren2020 阅读(181) 评论(0) 推荐(0)