C++学习书籍推荐《Effective STL(英文)》下载
百度云及其他网盘下载地址:点我
作者简介
Scott Meyers is one of the world's foremost authorities on C++, providing training and consulting services to clients worldwide. He is the author of the best-selling Effective C++ series of books (Effective C++, More Effective C++, and Effective STL) and of the innovative Effective C++ CD. He is consulting editor for Addison Wesley's Effective Software Development Series and serves on the Advisory Board for The C++ Source (http://www.artima.com/cppsource). He holds a Ph.D. in Computer Science from Brown University. His web site is http://www.aristeia.com.
目录
Preface xi
Acknowledgments xv
Introduction 1
Chapter 1: Containers 11
Item 1: Choose your containers with care. 11
Item 2: Beware the illusion of container-independent code. 15
Item 3: Make copying cheap and correct for objects in containers. 20
Item 4: Call empty instead of checking size() against zero. 23
Item 5: Prefer range member functions to their single-element counterparts. 24
Item 6: Be alert for C++’s most vexing parse. 33
Item 7: When using containers of newed pointers, remember to delete the pointers before the container is destroyed. 36
Item 8: Never create containers of auto_ptrs. 40
Item 9: Choose carefully among erasing options. 43
Item 10: Be aware of allocator conventions and restrictions. 48
Item 11: Understand the legitimate uses of custom allocators. 54
Item 12: Have realistic expectations about the thread safety of STL containers. 58
Chapter 2: vector and string 63
Item 13: Prefer vector and string to dynamically allocated arrays. 63
Item 14: Use reserve to avoid unnecessary reallocations. 66
Item 15: Be aware of variations in string implementations. 68
Item 16: Know how to pass vector and string data to legacy APIs. 74
Item 17: Use “the swap trick” to trim excess capacity. 77
Item 18: Avoid using vector<bool>. 79
Chapter 3: Associative Containers 83
Item 19: Understand the difference between equality and equivalence. 83
Item 20: Specify comparison types for associative containers of pointers. 88
Item 21: Always have comparison functions return false for equal values. 92
Item 22: Avoid in-place key modification in set and multiset. 95
Item 23: Consider replacing associative containers with sorted vectors. 100
Item 24: Choose carefully between map::operator[] and map::insert when efficiency is important. 106
Item 25: Familiarize yourself with the nonstandard hashed containers. 111
Chapter 4: Iterators 116
Item 26: Prefer iterator to const_iterator, reverse_iterator, and const_reverse_iterator. 116
Item 27: Use distance and advance to convert const_iterators to iterators. 120
Item 28: Understand how to use a reverse_iterator’s base iterator. 123
Item 29: Consider istreambuf_iterators for character by character input. 126
Chapter 5: Algorithms 128
Item 30: Make sure destination ranges are big enough. 129
Item 31: Know your sorting options. 133
Item 32: Follow remove-like algorithms by erase if you really want to remove something. 139
Item 33: Be wary of remove-like algorithms on containers of pointers. 143
Item 34: Note which algorithms expect sorted ranges. 146
Item 35: Implement simple case-insensitive string comparisons via mismatch or lexicographical_compare. 150
Item 36: Understand the proper implementation of copy_if. 154
Item 37: Use accumulate or for_each to summarize ranges. 156
Chapter 6: Functors, Functor Classes, Functions, etc. 162
Item 38: Design functor classes for pass-by-value. 162
Item 39: Make predicates pure functions. 166
Item 40: Make functor classes adaptable. 169
Item 41: Understand the reasons for ptr_fun, mem_fun, and mem_fun_ref. 173
Item 42: Make sure less<T> means operator<. 177
Chapter 7: Programming with the STL 181
Item 43: Prefer algorithm calls to hand-written loops. 181
Item 44: Prefer member functions to algorithms with the same names. 190
Item 45: Distinguish among count, find, binary_search, lower_bound, upper_bound, and equal_range. 192
Item 46: Consider function objects instead of functions as algorithm parameters. 201
Item 47: Avoid producing write-only code. 206
Item 48: Always #include the proper headers. 209
Item 49: Learn to decipher STL-related compiler diagnostics. 210
Item 50: Familiarize yourself with STL-related web sites. 217
Bibliography 225
Appendix A: Locales and Case-Insensitive String Comparisons 229
Appendix B: Remarks on Microsoft’s STL Platforms 239
Index 245
百度云及其他网盘下载地址:点我
C++学习书籍推荐《Effective STL(英文)》下载的更多相关文章
- C语言学习书籍推荐《C Primer Plus(中文版)(第5版)》下载
普拉塔 (Prata S.) (作者), 云巅工作室 (译者) <C Primer Plus(中文版)(第5版)>共17章,介绍了C语言的基础知识,包括数据类型.格式化输入输出.运算符.表 ...
- java虚拟机的学习书籍推荐
javaEE开发已然是一个老生常谈的话题了,但经典之所以会成为经典,就是因为有可重复琢磨之处,每一次的反复推敲都会有不一样的收获.如果你不满足于做一个只会写if…else…的Java程序员,而是希望更 ...
- C++学习书籍推荐《Accelerated C++中文版》下载
百度云及其他网盘下载地址:点我 媒体推荐 书评 这是一本一流的C++入门书,它采用了一种和实践相结合的方式来解决具体的问题.相比我所见过的其他C++入门书来说,本书以令人惊奇的紧凑格式覆盖了更多的关于 ...
- C语言学习书籍推荐《C陷阱与缺陷》下载
下载地址:点我 凯尼格 (作者), 高巍 (译者) <C和C++经典著作:C陷阱与缺陷>适合有一定经验的C程序员阅读学习,即便你是C编程高手,<C和C++经典著作:C陷阱与缺陷> ...
- C语言学习书籍推荐《C和指针 Pointers On C》下载
<C和指针 POINTERS ON C>提供与C语言编程相关的全面资源和深入讨论.本书通过对指针的基础知识和高 级特性的探讨,帮助程序员把指针的强大功能融入到自己的程序中去. 全书共18 ...
- java学习书籍推荐
1. Java 语言基础 谈到Java 语言基础学习的书籍,大家肯定会推荐Bruce Eckel 的<Thinking in Java >.它是一本写的相当深刻的技术书籍,Java 语言基 ...
- linux学习书籍推荐linux学习书籍推荐
引用地址:http://www.cnblogs.com/notepi/archive/2013/06/15/3137103.html Linux 学习书目推荐 Linux基础 1.<Linux与 ...
- 19年最新 Python0基础学习书籍推荐(内涵PDF地址以及书籍源码)
去年看过一篇文章,是关于18年的最适合0基础学习的书籍,今年,最新的书籍也已经统计出来.书籍的PDF太过于难找,所以很多PDF都找不到. 仅仅只能找到英文版PDF 本文章统计了18.19并做过对比,在 ...
- c++学习书籍推荐《C++沉思录》下载
百度云及其他网盘下载地址:点我 编辑推荐 经典C++图书,应广大读者的强烈要求再版 目录 第0章 序幕第一篇 动机第1章 为什么我用C++第2章 为什么用C++工作第3章 生活在现实世界中 第二篇 类 ...
- c++学习书籍推荐《C++编程思想第一卷》下载
百度云及其他网盘下载地址:点我 编辑推荐 <C++编程思想>(第1卷)(第2版)第1版荣获"软件开发"杂志评选的1996年度 图书震撼大奖,中文版自2000年推出以来, ...
随机推荐
- Qt MVC设计模式(五篇)
http://blog.csdn.net/qq_19672579/article/details/46952675http://blog.csdn.net/qq_19672579/article/de ...
- HTTP协议入门(一)- 版本
当我们在浏览器的地址栏输入URL后,信息会被发送到WEB服务器,服务器得到响应,将数据传输回来,展示到WEB页面上,这其中的传输方法就是HTTP协议. 一.HTTP 0.9 发布于1991年,是首个H ...
- Simple BeamSearch Codes for Python
Code from: https://github.com/SeitaroShinagawa/simple_beamsearch probs = [[[],[0.3,0.7]], [[0],[0.1, ...
- ADO.NET基础开发
ADO.NET是微软新一代.NET数据库的访问架构,ADO是ActiveX Data Objects的缩写.ADO.NET是数据库应用程序和数据源之间沟通的桥梁,主要提供了一个面向对象的数据访问架构, ...
- /etc/passwd和/etc/group文件详解
用户管理 想要知道, 系统中有哪些用户, 可以查看这个文件: /etc/passwd root:x:::root:/root:/bin/bash bin:x:::bin:/bin:/sbin/nolo ...
- Cannot read property 'substring' of undefined
这个是在使用 jquery的ztree插件过程中遇到的错误 原因是数据的格式和规定的格式不一致,需要把数据按照模板给的样子来
- mencache的使用二
在这里说的是在C#中的使用,在C#中使用是需要引入驱动的, 可以在网上找,这里推荐一个链接http://sourceforge.net/projects/memcacheddotnet/ 将Memca ...
- 查看SharePoint文档库是,显示层次目录,可以点击返回层次
在sharepoint 2013中,Documnet library(文档库)包含多层文件夹,当进入到文件夹后,返回指定层次了(例如返回上一层),需要用浏览器的返回. 使用起来不方便,而且浏览器的返回 ...
- c#透明TextBox
在 http://www.codeproject.com/KB/edit/AlphaBlendedTextControls.aspx 的基础上增加了水印文字 代码如下: public class Te ...
- Qt5 中对 C++11 一些新特性的封装
在 Qt5 中,提供更多 C++11 的特性支持,接下来我们将进行详细的说明. slots (槽) 的 Lambda 表达式 Lambda表达式 是 C++11 中的一个新语法,允许定义匿名函数.匿名 ...