首页>参考读物>计算机科学与技术>软件与程序设计

More Effective C++(英文版)
作者 : Scott Meyers
丛书名 : C++设计新思维
出版日期 : 2006-04-21
ISBN : 7-111-18830-6
定价 : 39.00元
扩展资源下载
扩展信息
语种 : 英语
页数 : 318
开本 : 16开
原书名 : More Effiective C++: 35 New Ways to Improve Your Programs and Designs
原出版社: Addison Wesley
属性分类: 店面
包含CD :
绝版 : 未绝版
图书简介


  与其姊妹篇《Effective C++》一样,本书充满了实用性很强的忠告,是C++程序员必备的读物。

本书主要内容
  ●一些经过验证的用来改善程序效率的方法,包括检验C++语言特性所带来的时间和空间上的成本。
  ●全面地描述了C++专家所使用的高级技术,包括placement new、virtual constructors、smart pointers、reference counting、proxy classes和double-dispatching等。
  ●以实例说明异常处理带给C++类和函数的冲击。
  ●介绍新的语言特性,包括bool、mutable、explicit、namespaces、成员模板、标准模板库等。如果你的编译器不支持这些特性,本书还介绍了如何不利用它们完成工作。

图书特色

封底文字

作者简介

Scott Meyers:Scott Meyers:  Scott Meyers 拥有布朗大学计算机科学博士学位,是世界上最著名的C++软件开发权威之一。他的“Effective C++两卷本” (《Effective C++》和《More Effective C++》) ,开辟了技术图书写作的新风格。他曾担任《C++ Report》杂志的专栏作家,经常为《C/C++ Users Journal》和《Dr. Dobb' s Journal》撰稿。

推荐序

图书目录

Acknowledgments xi
Introduction 1
Basics 9

Item 1: Distinguish between pointers and references. 9
Item 2: Prefer C++-style casts. 12
Item 3: Never treat arrays polymorphically. 16
Item 4: Avoid gratuitous default constructors. 19

Operators 24

Item 5: Be wary of user-defined conversion functions. 24
Item 6: Distinguish between prefix and postfix forms of increment and decrement operators. 31
Item 7: Never overload &&, ||, or ,. 35
Item 8: Understand the different meanings of new and delete. 38

Exceptions 44

Item 9: Use destructors to prevent resource leaks. 45
Item 10: Prevent resource leaks in constructors. 50
Item 11: Prevent exceptions from leaving destructors. 58
Item 12: Understand how throwing an exception differs from passing a parameter or calling a virtual function. 61
Item 13: Catch exceptions by reference. 68
Item 14: Use exception specifications judiciously. 72
Item 15: Understand the costs of exception handling. 78

Efficiency 81

Item 16: Remember the 80-20 rule. 82
Item 17: Consider using lazy evaluation. 85
Item 18: Amortize the cost of expected computations. 93
Item 19: Understand the origin of temporary objects. 98
Item 20: Facilitate the return value optimization. 101
Item 21: Overload to avoid implicit type conversions. 105
Item 22: Consider using op= instead of stand-alone op. 107
Item 23: Consider alternative libraries. 110
Item 24: Understand the costs of virtual functions, multiple inheritance, virtual base classes, and RTTI. 113

Techniques 123

Item 25: Virtualizing constructors and non-member functions. 123
Item 26: Limiting the number of objects of a class. 130
Item 27: Requiring or prohibiting heap-based objects. 145
Item 28: Smart pointers. 159
Item 29: Reference counting. 183
Item 30: Proxy classes. 213
Item 31: Making functions virtual with respect to more than one object. 228

Miscellany 252

Item 32: Program in the future tense. 252
Item 33: Make non-leaf classes abstract. 258
Item 34: Understand how to combine C++ and C in the same program. 270
Item 35: Familiarize yourself with the language standard. 277

Recommended Reading 285

An auto_ptr Implementation 291

General Index 295

Index of Example Classes, Functions, and Templates 313

教学资源推荐
作者: John R.Hubbard
作者: 陈秋劲
作者: 邱李华 曹青 郭志强 编著
参考读物推荐
作者: Bruce Eckel
作者: Borland/Inprise公司
作者: 邓子云 郝斌 等