随笔- 191
文章- 0
评论- 35
阅读-
21万
随笔分类 - stl文章的翻译
本人翻译的一些文章,属于The c++ standard library
编译 boost
摘要:理论上,本文适用于boost的各个版本,尤其是最新版本1.45.0;适用于各种C++编译器,如VC6.0(部分库不支持),VS2003,VS2005,VS2008,gcc,C++ Builder等。先总结一下Windows系统。一、下载首先从boost官方主页http://www.boost.org/下载最新版boost安装包(目前最新版是boost_1_45_0.7z)。二、安装将boost安装包解压至本地目录,如:E:\SDK\boost_1_45_0。因为boost一部分类是需要编译成库才能使用的,所以我们还需要准备好boost专用的编译辅助工具bjam。在命令提示符(cmd.exe)中
阅读全文
for_each()在函数对象中的独特作用
摘要:for_each可以遍历list,vecotr中值,同时把其中之一的值传入函数对象,调用()操作符进行重载,并把最终的运算结果放入一个函数对象中返回.这个功能是其它的算法所没有的,使用方法如下. #include #include #include #include #include #include #include #include #include usin...
阅读全文
5.4.1 Ranges 几个通用的算法
摘要:#include #include #include #include #include #include #include #include #include using namespace std; void main() { listm_list; //定义一个链表 for (...
阅读全文