类名: timer
特点:timer接口简单,elapsed_min() elapsed_max() 代表了timer的能力,它不适合高精度的时间测量,也不适合跨度较大的时间段测量,它能提供的最大时间段也就几百小时
类名:progress_timer
特点:继承类timer的全部特点,用法更简单,析构的时候调用elapsed()输出时间段,花括号可以定义其生命周期,构造函数指定一个输出流,默...
分类:
其他好文 时间:
2015-02-28 18:41:59
阅读次数:
122
// FirstTest.cpp : 定义控制台应用程序的入口点。
//function 存放方法的地址,函数的包装器(function wrapper)
//*iterator1 内容为参数传入function
#include "stdafx.h"
#include
#include
#include
using namespace std;
using namespace boos...
分类:
其他好文 时间:
2015-02-28 14:39:29
阅读次数:
146
// FirstTest.cpp : 定义控制台应用程序的入口点。
//bind(&mem,&obj, _1):类成员方法地址,对象地址,_1是占位符
//同一个类的不同对象可以delegate给不同的实现,从而实现不同的行为(myan语)
#include "stdafx.h"
#include
#include
#include
#include
using namespace s...
分类:
其他好文 时间:
2015-02-28 14:34:18
阅读次数:
177
智能指针是一种具备指针类似行为的对象,当不在需要它的时候自动删除其引用的c++对象。直接点说就是自动析构C++对象。boost提供了6种智能指针,如下所示:scoped_ptr单个对象的简单的唯一所有权. 不能拷贝.scoped_array数组对象的唯一所有权. 不能拷贝.shared_ptr多个指...
分类:
其他好文 时间:
2015-02-27 14:58:45
阅读次数:
125
boost::scoped_ptr和std::auto_ptr非常类似,是一个简单的智能指针,它能够保证在离开作用域后对象被自动释放。下列代码演示了该指针的基本应用:#include #include #include class implementation{public: ~impleme...
分类:
其他好文 时间:
2015-02-27 13:21:50
阅读次数:
181
ccfast这是一个基于FastCGI和C 的基于HTTP的Resuful API开发框架。其依赖于fastcgi库,boost库,libmysql ,libredis,其中用了C 11的特性。前端web服务器我们使用Nginx,需要的配置如下: location ~* ^/ccfast/. \.do$ {
fastcgi_pass 127.0.0.1:10...
分类:
其他好文 时间:
2015-02-26 21:43:35
阅读次数:
170
http://www.boost.org/doc/libs/1_57_0/libs/pool/doc/html/boost_pool/pool/pooling.html
分类:
其他好文 时间:
2015-02-26 13:09:17
阅读次数:
109
In our modern world, everyone is looking to do things faster, better, smarter, so it‘s no wonder that productivity hacks are incredibly popular. But the truth is that there‘s nothing new under the ...
分类:
其他好文 时间:
2015-02-22 17:25:45
阅读次数:
195
今天Mayuyu将来讲述一个非常实用的C++库,它叫做Boost C++库。Boost库中加入了一些在实战中非常常用的函数对C++标准进行了扩充,在实际开发中非常有用。
Boost C++的安装包可以在这里下载:http://www.boost.org/
解压后进入目录执行:sh bootstrap.sh。
完成后得到了b2可执行文件,继续执行./b2,最后执行./bjam完成安...
分类:
编程语言 时间:
2015-02-21 17:43:21
阅读次数:
172
threadnullmethodsprocessingobjectsignal[cpp] view plaincopy//QueueImplementation.cpp:Definestheentrypointfortheconsoleapplication.//#include"stdafx.h"...
分类:
编程语言 时间:
2015-02-16 19:35:17
阅读次数:
570