自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

转载 php的正则表达式完全手册

前言    正则表达式是烦琐的,但是强大的,学会之后的应用会让你除了提高效率外,会给你带来绝对的成就感。只要认真去阅读这些资料,加上应用的时候进行一定的参考,掌握正则表达式不是问题。 索引    1._引子    2._正则表达式的历史    3._正则表达式定义     3.1_普通字符     3.2_非打印字符     3.3_特殊字符

2015-07-04 08:55:23 2155

转载 通过流迭代器实现vector的输入输出

[cpp] view plaincopyprint? // 功能:通过流迭代器实现vector的输入输出   // istream_iterator(),调用其默认构造函数,产生eof。   void test_stream_iterator_vector()   {       // std::vector vect;       // 输入方法1:使用标

2015-06-09 10:42:47 1248

转载 vector的五种构造函数

oid test_vector_constructor()   {       // 0. Create an empty vector v0       std::vectorint> v0;       assert(v0.empty());          // 1. Create a vector v1 with 3 elements of default value 0  

2015-06-09 10:42:09 1993

转载 常用容器的方法

1. vector Constructors 构造函数  Operators 对vector进行赋值或比较  assign() 对Vector中的元素赋值  at() 返回指定位置的元素  back() 返回最末一个元素  begin() 返回第一个元素的迭代器  capacity() 返回vector所能容纳的元素数量(在不重新分配内存的情况下)  clear() 清空所有元素 

2015-06-09 10:40:28 450

转载 vector的insert方法详解

cpp] view plaincopyprint? iterator insert(      const_iterator _Where,      const Type& _Val   );   iterator insert(      const_iterator _Where,      Type&& _Val   );   void ins

2015-06-09 10:40:24 924

转载 vector常用函数的例子

[cpp] view plaincopyprint? // erase功能:移除vector中部分的元素   void test_vector_erase()   {       int t[7] = {10, 11, 12, 13, 14, 15, 16};         std::vectorint> vect(t, t + 7);         

2015-06-09 10:38:27 450

转载 list常用函数的例子

[cpp] view plaincopyprint? void test_list_assign()   {       std::listint> c1;       std::listint> c2;       c1.push_back(10);       c1.push_back(20);       c1.push_back(30);    

2015-06-09 10:38:24 468

转载 list的构造函数

[cpp] view plaincopyprint? explicit list(      const Allocator& _Al   );   explicit list(      size_type _Count   );   list(      size_type _Count,      const Type& _Val   );  

2015-06-09 10:37:53 893

转载 bind1st与bind2nd函数解析

[cpp] view plaincopyprint? // bind1st和bind2nd函数把一个二元函数对象绑定成为一个一元函数对象。   // 但是由于二元函数对象接受两个参数,在绑定成为一元函数对象时需要将原来两个参数中的一个绑定下来。   // 也即通过绑定二元函数对象的一个参数使之成为一元函数对象的。   // bind1st是绑定第一个参数,bin

2015-06-09 10:36:21 477

转载 copy, copy_if, copy_backward函数解析

[cpp] view plaincopyprint? void test_copy()   {       int src[5] = {3, 6, 9, 12, 15};       int dect[10] = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100};       std::vectorint> src_vect(

2015-06-09 10:35:44 336

转载 常用的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 348

转载 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 879

转载 find示例

find声明: [cpp] view plaincopyprint? templateclass InputIterator, class Type>      InputIterator find(         InputIterator _First,          InputIterator _Last,          cons

2015-06-09 10:33:12 382

转载 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 353

转载 ptrdiff_t示例

ptrdiff_t是C/C++标准库中定义的一个与机器相关的数据类型。ptrdiff_t类型变量通常用来保存两个指针减法操作的结果。ptrdiff_t定义在stddef.h(cstddef)这个文件内。ptrdiff_t通常被定义为long int类型。 [cpp] view plaincopyprint? void test_ptrdiff_t()

2015-06-09 10:29:56 444

转载 【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 384

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除