
boost库学习
风清扬_jd
专注搬砖
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Boost学习笔记(三)------boost::bimap的使用
#include #include #include #include using namespace std;using namespace boost;int main(int argc, _TCHAR* argv[]){ bimapbm;bm.left.insert(std::make_pair(1,"sty1")); //向左视图添加数据b原创 2014-02-25 20:51:47 · 2023 阅读 · 0 评论 -
Boost学习笔记(四)---利用boost::property_tree;读写xml文件,保存文件
定义xml文件如下所示:96小青峰jd http://www.urll.comhttp://www.ur22.comhttp://www.ur33.com24#include #include #include #include using namespace std;using namespace boost;int main(i原创 2014-02-26 21:19:08 · 2018 阅读 · 0 评论 -
Boost学习笔记(五)---宏介绍BOOST_TYPEOF和BOOST_AUTO
头文件里定义了两个宏:BOOST_TYPEOF和BOOST_AUTO,分别用于仿真C++新标准的typeof和auto关键字,可以在编译期自动推导表达式的类型。它们不仅能够推导C++语言内建的int、double、数组、函数指针等等类型,也支持标准库中的容器类型,使程序员再也不需要写复杂的类型定义就能够轻松声明变量。这两个宏完全模仿了typeof和auto关键字的用法,除了因为宏的转载 2014-02-20 16:54:49 · 1755 阅读 · 0 评论 -
Boost学习笔记(一)----scoped_ptr智能指针的使用
#include #include #include using namespace std;using namespace boost;int main(int argc, _TCHAR* argv[]){ /*scoped_ptr 指针会调用该类析构函数负责内存的释放*/scoped_ptrpTest(new std::string("h原创 2014-02-19 19:36:13 · 949 阅读 · 0 评论 -
Boost学习笔记(二)------boost::array数组的使用
#include #include using namespace std;using namespace boost;int main(int argc, _TCHAR* argv[]){ /*boost::array 和普通标准数组一样,但是不具备std::vector 的动态变动数组容量的功能,使用的时候要注意*/boost::array ar原创 2014-02-20 17:16:23 · 5973 阅读 · 0 评论 -
Boost学习笔记(六)---利用boost库string_algo::split函数分割字符串
#include #include #include using namespace std;using namespace boost;int main(int argc, _TCHAR* argv[]){ string strTmp1 = "1,2,3,5,6";typedef vector split_vector_type;spl原创 2014-04-15 15:18:00 · 2336 阅读 · 0 评论