boost
文章平均质量分 71
kagula086
高级码农
展开
-
boost的filesystem使用示例
boost::filesystem使用示例代码,这里记一下,免得到时候又找不到在哪里了。。。原创 2017-01-13 14:24:45 · 1421 阅读 · 0 评论 -
常用智能指针使用源代码示例
boost常用智能指针使用示例。原创 2010-02-02 13:26:00 · 2898 阅读 · 1 评论 -
boost::asio TCP客户端编程示例
// testASIOClient.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include #include #include #include using boost::asio::io_service; using boost:原创 2010-01-29 16:42:00 · 5960 阅读 · 0 评论 -
boost::bind应用示例
// testBind.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include #include #include #include /* Title:boost::bind应用示例 示例运行环境: [1]bo原创 2010-01-29 16:28:00 · 1049 阅读 · 0 评论 -
Boost::thread库的使用
Boost::thread库的使用2009/11/26Kagula 阅读对象本文假设读者有几下Skills[1]在C++中至少使用过一种多线程开发库,有Mutex和Lock的概念。[2]熟悉C++开发,在开发工具中,能够编译、设置boost::thread库。 环境[1]Visual Studio 2005/2008 with SP1[2]b原创 2009-10-15 05:12:00 · 27456 阅读 · 0 评论 -
Boost库取CRC64校验码示例
Boost CRC原创 2011-05-26 13:06:00 · 3506 阅读 · 0 评论 -
CMake - boost - 可执行程序 - 静态库
CMake - boost最后更新日期:2014-04-25by kagula阅读前提:《CMake入门(二)》、Linux的基本操作环境: Windows 8.1 64bit英文版,Visual Studio 203 Update1英文版,CMake 2.8.12.2、 Cent OS 6.5、Cent OS 6.5自带gcc 4.4.7、icu 4.2.1 内容简介原创 2014-11-02 09:58:39 · 9396 阅读 · 0 评论 -
演示boost::asio::deadline_timer如何使用
/*标题:演示boost::asio::deadline_timer如何使用作者:Kagula知识点:[1]boost::asio::strand实例让多根线程逐个执行 [2]boost::asio::io_service的run会等待boost::asio::strand实例 中的线程全部执行完毕。测试环境:Visual Studio 2013 Update2最后原创 2014-06-04 21:40:25 · 1522 阅读 · 0 评论 -
用boost分割字符串的代码示例
#include "stdafx.h"#include #include /*测试环境[1]VS2010SP1,boost 1.55*/int _tmain(int argc, _TCHAR* argv[]){ std::string str="abc,def gul,中文,古 典,答辩"; typedef boost::tokenizer > Token; //分隔原创 2014-05-23 09:09:48 · 1851 阅读 · 0 评论 -
测试lambda的使用
// testLambda.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include #include #include #include //使用std::function必须包含这个头文件using namespace std;/*Title:测试lam原创 2014-09-18 17:45:53 · 1290 阅读 · 0 评论 -
boost.Multi_Index库的使用
#include "stdafx.h"#include #include #include #include #include #include #include /*标题:boost.Multi_Index库的使用功能:类似std::map的容器,但是可以用多个关键词索引数据描述:boost::multi_index::multi_index_container为容器原创 2014-11-02 09:00:19 · 7503 阅读 · 0 评论 -
cpp-netlib笔记二:实现http文件服务功能
贴出在cpp-netlib基础上实现http服务的源代码。原创 2017-06-01 11:07:26 · 1610 阅读 · 0 评论 -
为Boost ASIO的http server4例子添加Cookie和Post/Get参数提取支持
在boost asio 例子http server4中添加对session和get/post支持,使之可以实现简单的后台http请求处理。本文出现的代码在VS2013Update5 Boost 1.6.1环境下调试通过。原创 2016-12-28 15:22:29 · 3764 阅读 · 4 评论 -
boost filesystem测试
boost的filesystem子库的常用功能测试。原创 2016-01-18 16:18:10 · 2893 阅读 · 0 评论 -
boost::regex示例代码
#include <iostream>#include <string>#include <boost/regex.hpp>using namespace std;/*标题:测试boost::regex的常用功能最后更新日期:2015-03-02环境:boost 1.57、VS2013Update4注意下面两个方法的区别:regex_m...原创 2015-03-02 17:09:43 · 1301 阅读 · 0 评论 -
boost::log库,示例代码
测试环境:[1]boost 1.57, 1.64[2]VS2013Update3, VS2017Update5介绍 前面给出几个简单的示例,最后给出Boost::Log的封装。主要来源[1]boost官网,做了些微小的改动。最简单的示例// TestBoostLog.cpp : Defines the entry point fo...原创 2015-01-19 16:28:20 · 5663 阅读 · 0 评论 -
测试了下boost的序列化反序列化功能
// testSerialization.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include #include #include #include #include #include #include #include /*标题:boost原创 2014-08-07 16:33:21 · 4401 阅读 · 0 评论 -
测试boost线程锁(多读一写lock、非阻塞lock)
第一步:添加头文件#include #include 第二步:声明全局Mutexboost::shared_mutex g_mutex; 第三步:使用独占锁void func(){ boost::unique_lock lock(g_mutex); //实例化时,顺便Lock //通过修改“实例化”时的参数,你也可以显示Lock。原创 2010-04-19 15:55:00 · 8864 阅读 · 0 评论 -
windows下使用Visual C++编译boost库!
参考下面的方式可以编译出不同Visual Studio版本的库b2 --toolset=msvc-14.2 即VS2019 (boost1.72以上版本,使用bootstrap.bat生成b2.exe)bjam --toolset=msvc-14.1 即VS2017bjam --toolset=msvc-12.0 即VS2013bjam --toolset=msvc...原创 2014-07-14 13:28:33 · 6049 阅读 · 0 评论 -
cpp-netlib笔记三-Cookie支持测试
测试cpp-netlib对Cookie的支持,直接贴代码。原创 2017-06-02 10:21:49 · 596 阅读 · 0 评论 -
Boost any库的笔记
cpp源文件清单#include <boost/any.hpp>#include <boost/smart_ptr.hpp>#include <map>#include <vector>#include <string>#include <iostream>using namespace std;/*Tit...原创 2016-03-10 16:42:02 · 782 阅读 · 0 评论