
C++STL
文章平均质量分 70
qq64602632
这个作者很懒,什么都没留下…
展开
-
常用的operator classes
[cpp] view plaincopyprint?void test_plus() { // 数组与数组之间求和 int first[] = {1, 2, 3, 4, 5}; int second[] = {10, 20, 30, 40, 50}; int results[5]; tran转载 2015-06-09 10:35:06 · 294 阅读 · 0 评论 -
【STL】bitset示例
构造函数bitset b; b有n位,每位都为0.参数n可以为一个表达式.如bitset b0;则"b0"为"00000"; bitset b(unsigned long u); b有n位,并用u赋值;如果u超过n位,则顶端被截除如:bitsetb0(5);则"b0"为"00101"; bitset b(string s); b是string对象s中含有的位转载 2015-06-04 20:24:48 · 329 阅读 · 0 评论 -
find示例
find声明:[cpp] view plaincopyprint?templateclass InputIterator, class Type> InputIterator find( InputIterator _First, InputIterator _Last, cons转载 2015-06-09 10:33:12 · 314 阅读 · 0 评论 -
ptr_fun详解
ptr_fun是将一个普通的函数适配成一个仿函数(functor), 添加上argument_type和result type等类型,它的定义如下:[cpp] view plaincopyprint?templateclass _Arg1, class _Arg2, class _Result> inline转载 2015-06-09 10:34:47 · 807 阅读 · 0 评论 -
for_each示例
[cpp] view plaincopyprint?void myfun1(int& i) { std::cout " "; } void myfun2(int i, const char* prefix) { std::cout } struct mystruct1 { v转载 2015-06-09 10:32:45 · 288 阅读 · 0 评论 -
php的正则表达式完全手册
前言 正则表达式是烦琐的,但是强大的,学会之后的应用会让你除了提高效率外,会给你带来绝对的成就感。只要认真去阅读这些资料,加上应用的时候进行一定的参考,掌握正则表达式不是问题。索引 1._引子 2._正则表达式的历史 3._正则表达式定义 3.1_普通字符 3.2_非打印字符 3.3_特殊字符转载 2015-07-04 08:55:23 · 2013 阅读 · 1 评论