百度云及其他网盘下载地址:点我

作者简介

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(英文)》下载的更多相关文章

  1. C语言学习书籍推荐《C Primer Plus(中文版)(第5版)》下载

    普拉塔 (Prata S.) (作者), 云巅工作室 (译者) <C Primer Plus(中文版)(第5版)>共17章,介绍了C语言的基础知识,包括数据类型.格式化输入输出.运算符.表 ...

  2. java虚拟机的学习书籍推荐

    javaEE开发已然是一个老生常谈的话题了,但经典之所以会成为经典,就是因为有可重复琢磨之处,每一次的反复推敲都会有不一样的收获.如果你不满足于做一个只会写if…else…的Java程序员,而是希望更 ...

  3. C++学习书籍推荐《Accelerated C++中文版》下载

    百度云及其他网盘下载地址:点我 媒体推荐 书评 这是一本一流的C++入门书,它采用了一种和实践相结合的方式来解决具体的问题.相比我所见过的其他C++入门书来说,本书以令人惊奇的紧凑格式覆盖了更多的关于 ...

  4. C语言学习书籍推荐《C陷阱与缺陷》下载

    下载地址:点我 凯尼格 (作者), 高巍 (译者) <C和C++经典著作:C陷阱与缺陷>适合有一定经验的C程序员阅读学习,即便你是C编程高手,<C和C++经典著作:C陷阱与缺陷> ...

  5. C语言学习书籍推荐《C和指针 Pointers On C》下载

    <C和指针 POINTERS ON C>提供与C语言编程相关的全面资源和深入讨论.本书通过对指针的基础知识和高 级特性的探讨,帮助程序员把指针的强大功能融入到自己的程序中去.  全书共18 ...

  6. java学习书籍推荐

    1. Java 语言基础 谈到Java 语言基础学习的书籍,大家肯定会推荐Bruce Eckel 的<Thinking in Java >.它是一本写的相当深刻的技术书籍,Java 语言基 ...

  7. linux学习书籍推荐linux学习书籍推荐

    引用地址:http://www.cnblogs.com/notepi/archive/2013/06/15/3137103.html Linux 学习书目推荐 Linux基础 1.<Linux与 ...

  8. 19年最新 Python0基础学习书籍推荐(内涵PDF地址以及书籍源码)

    去年看过一篇文章,是关于18年的最适合0基础学习的书籍,今年,最新的书籍也已经统计出来.书籍的PDF太过于难找,所以很多PDF都找不到. 仅仅只能找到英文版PDF 本文章统计了18.19并做过对比,在 ...

  9. c++学习书籍推荐《C++沉思录》下载

    百度云及其他网盘下载地址:点我 编辑推荐 经典C++图书,应广大读者的强烈要求再版 目录 第0章 序幕第一篇 动机第1章 为什么我用C++第2章 为什么用C++工作第3章 生活在现实世界中 第二篇 类 ...

  10. c++学习书籍推荐《C++编程思想第一卷》下载

    百度云及其他网盘下载地址:点我 编辑推荐 <C++编程思想>(第1卷)(第2版)第1版荣获"软件开发"杂志评选的1996年度 图书震撼大奖,中文版自2000年推出以来, ...

随机推荐

  1. WPF DataGrid自定义列DataGridTextColumn.ElementStyle和DataGridTemplateColumn.CellTemplate

    <Window x:Class="DataGridExam.MainWindow"        xmlns="http://schemas.microsoft.c ...

  2. Thinkphp模板开放给第三方编辑权限时,如何禁止模板使用php代码

    首先我要吐槽一个问题:为什么在博客园发布的文章总是被其他网站采集过去,而他们采集过去后,排名比博客园还好,比如这篇文章,我把标题复制到百度搜索,结果第一页的搜索结果全部都是采集我的,而我在博客园发布的 ...

  3. js 跨域访问 获取验证码图片 获取header 自定义属性

    1.net core web api 后端 /// <summary> /// 图形验证码 /// </summary> [HttpGet] public IActionRes ...

  4. Win8Metro(C#)数字图像处理--2.7图像伪彩色

    原文:Win8Metro(C#)数字图像处理--2.7图像伪彩色  2.7图像伪彩色函数 [函数名称] 图像伪彩色函数PseudoColorProcess(WriteableBitmap src) ...

  5. 算法之--字符串包含【python实现】

    题目描述 给定两个分别由字母组成的字符串A和字符串B,字符串B的长度比字符串A短.请问,如何最快地判断字符串B中所有字母是否都在字符串A里? 为了简单起见,我们规定输入的字符串只包含大写英文字母,请实 ...

  6. Cannot read property 'apply' of undefined

    ...TypeError: Cannot read property 'apply' of undefined :一般都是作用域不对 ...TypeError: Cannot read propert ...

  7. 改善C#程序的建议8:避免锁定不恰当的同步对象

    原文:改善C#程序的建议8:避免锁定不恰当的同步对象 在C#中让线程同步的另一种编码方式就是使用线程锁.所谓线程锁,就是锁住一个资源,使得应用程序只能在此刻有一个线程访问该资源.可以用下面这句不是那么 ...

  8. AndroidStudio问题汇总

    1.Error:Execution failed for task ':app:preDebugAndroidTestBuild'.> Conflict with dependency 'com ...

  9. ML:吴恩达 机器学习 课程笔记(Week3~4)

    Logistic Regression Regularization Neural Networks: Representation

  10. 网易Lofter

    作为老网虫,对网易的感情是很深的.当我知道Lofter这个东西后,曾经很兴奋要好好打理自己的博客,然而兴奋很快过了.因为Lofter无时无刻不在刷存在感.无限空间加无限图片流量,国内的服务无法做的更好 ...