欢迎您来到懒之才-站长的分享平台!   学会偷懒,并懒出境界是提高工作效率最有效的方法!
首页 > 教程文档 > C/C++/C# > More Effective C++【PDF】【2.39MB】

More Effective C++【PDF】【2.39MB】

2019-03-30 864 收藏 0 赞一个 1 真差劲 0 去评论 去下载

内容简介

《More Effective C++:35个改善编程与设计的有效方法(中文版)》内容简介:继Effective C++之后,Scott Meyers于1996推出这本《More Effective C++(35个改善编程与设计的有效方法)》“续集”。条款变得比较少,页数倒是多了一些,原因是这次选材比“第一集”更高阶,尤其是第5章。Meyers将此章命名为技术(techniques),并明白告诉你,其中都是一些patterns,例如virtual constructors,smart pointers,reference counting,proxy classes,double dispatching……这一章的每个条款篇幅都达15-30 页之多,实在让人有“山重水复疑无路,柳暗花明又一村”之叹。
虽然出版年代稍嫌久远,但《More Effective C++》并没有第2版,原因是当其出版之时(1996),C++ Standard已经几乎定案,《More Effective C++:35个改善编程与设计的有效方法(中文版)》即依当时的标准草案而写,其与现今的C++ 标准规范几乎相同。而且可能变化的几个弹性之处,Meyers也都有所说明与提示。读者可以登录作者提供的网址,看看上下两集的勘误与讨论(数量之多,令人惊恐。幸好多是技术讨论或文字斟酌,并没有什么重大误失)。

目录

译序(侯捷)
导读(Introduction)
基础议题(Basics)
 条款1:仔细区别 pointers 和 references
 Distinguish between pointers and references.
 条款2:最好使用 C++ 转型操作符
 Prefer C++-style casts.
 条款3:绝对不要以多态(polymorphically)方式处理数组
 Never treat arrays polymorphically.
 条款4:非必要不提供 default constructor
 Avoid gratuitous default constructors.
操作符(Operators)
 条款5:对定制的“类型转换函数”保持警觉
 Be wary of user-defined conversion functions.
 条款6:区别 increment/decrement 操作符的
 前置(prefix)和后置(postfix)形式
 Distinguish between prefix and postfix forms of increment
 and decrement operators.
 条款7:千万不要重载&&,||和, 操作符
 Never overload &&, ||, or ,.
 条款8:了解各种不同意义的 new 和 delete
 Understand the different meanings of new and delete
异常(Exceptions)
 条款9:利用 destructors 避免泄漏资源
 Use destructors to prevent resource leaks.
 条款10:在 constructors 内阻止资源泄漏(resource leak)
 Prevent resource leaks in constructors.
 条款11:禁止异常(exceptions)流出 destructors 之外
 Prevent exceptions from leaving destructors.
 条款12:了解“抛出一个 exception”与“传递一个参数”
 或“调用一个虚函数”之间的差异61
 Understand how throwing an exception differs from
 passing a parameter or calling a virtual function.
 条款13:以 by reference 方式捕捉 exceptions
 Catch exceptions by reference.
 条款14:明智运用 exception specifications
 Use exception specifications judiciously.
 条款15:了解异常处理(exception handling)的成本
 Understand the costs of exception handling.
效率(Efficiency)
 条款16:谨记 80-20 法则
 Remember the 80-20 rule.
 条款17:考虑使用 lazy evaluation(缓式评估)
 Consider using lazy evaluation.
 条款18:分期摊还预期的计算成本
 Amortize the cost of expected computations.
 条款19:了解临时对象的来源
 Understand the origin of temporary objects.
 条款20:协助完成“返回值优化(RVO)”
 Facilitate the return value optimization.
 条款21:利用重载技术(overload)避免隐式类型转换(implict type conversions)
 Overload to avoid implicit type conversions.
 条款22:考虑以操作符复合形式(op=)取代其独身形式(op)
 Consider using op= instead of stand-alone op.
 条款23:考虑使用其他程序库
 Consider alternative libraries.
 条款24:了解 virtual functions、multiple inheritance、virtual baseclasses、
 runtime type identification 的成本
 Understand the costs of virtual functions, multipleinheritance,
 virtual base classes, and RTTI.
技术(Techniques, Idioms, Patterns)
杂项讨论(Miscellany)
索引(一)(General Index)
索引(二)(Index of Example Classes,Functions,and Templtes)

文档截图

QQ截图20190330183802.jpg

More Effective C++【PDF】【2.39MB】

一、推荐使用迅雷或快车等多线程下载软件下载本站资源。

二、未登录会员无法下载,登录后可获得更多便利功能,若未注册,请先注册。

三、如果服务器暂不能下载请稍后重试!总是不能下载,请点我报错 ,谢谢合作!

四、本站大部分资源是网上搜集或私下交流学习之用,任何涉及商业盈利目的均不得使用,否则产生的一切后果将由您自己承担!本站将不对任何资源负法律责任.如果您发现本站有部分资源侵害了您的权益,请速与我们联系,我们将尽快处理.

五、如有其他问题,请加网站设计交流群(点击这里查看交流群 )进行交流。

六、如需转载本站资源,请注明转载来自并附带链接

七、本站部分资源为加密压缩文件,统一解压密码为:www.aizhanzhe.com

下载地址
大家评论