图书介绍

C++ Gotchas 影印本PDF|Epub|txt|kindle电子书版本网盘下载

C++ Gotchas 影印本
  • (美)杜赫斯特著 著
  • 出版社: 北京:中国电力出版社
  • ISBN:7508314948
  • 出版时间:2003
  • 标注页数:325页
  • 文件大小:10MB
  • 文件页数:344页
  • 主题词:C语言-程序设计-英文

PDF下载


点此进入-本书在线PDF格式电子书下载【推荐-云解压-方便快捷】直接下载PDF格式图书。移动端-PC端通用
种子下载[BT下载速度快]温馨提示:(请使用BT下载软件FDM进行下载)软件下载地址页直链下载[便捷但速度慢]  [在线试读本书]   [在线获取解压码]

下载说明

C++ Gotchas 影印本PDF格式电子书版下载

下载的文件为RAR压缩包。需要使用解压软件进行解压得到PDF格式图书。

建议使用BT下载工具Free Download Manager进行下载,简称FDM(免费,没有广告,支持多平台)。本站资源全部打包为BT种子。所以需要使用专业的BT下载软件进行下载。如BitComet qBittorrent uTorrent等BT下载工具。迅雷目前由于本站不是热门资源。不推荐使用!后期资源热门了。安装了迅雷也可以迅雷进行下载!

(文件页数 要大于 标注页数,上中下等多册电子书除外)

注意:本站所有压缩包均有解压码: 点击下载压缩包解压工具

图书目录

Chapter 1 Basics1

Gotcha#1:Excessive Commenting1

Gotcha#2:Magic Numbers4

Gotcha#3:Global Variables6

Gotcha#4:Failure to Distinguish Overloading from Default Initialization8

Gotcha#5:Misunderstanding References10

Gotcha#6:Misunderstanding Const13

Gotcha#7:Ignorance of Base Language Subtleties14

Gotcha#8:Failure to Distinguish Access and Visibility19

Gotcha#9:Using Bad Language24

Gotcha#10:Ignorance of Idiom26

Gotcha#11:Unnecessary Cleverness29

Gotcha#12:Adolescent Behavior31

Chapter 2 Syntax35

Gotcha#13:Array/Initializer Confusion35

Gotcha#14:Evaluation Order Indecision36

Gotcha#15:Precedence Problems42

Gotcha#16:for Statement Debacle45

Gotcha#17:Maximal Munch Problems48

Gotcha#18:Creative Declaration-Specifier Ordering50

Gotcha#19:Function/Object Ambiguity51

Gotcha#20:Migrating Type-Qualifiers52

Gotcha#21:Self-Initialization53

Gotcha#22:Static and Extern Types55

Gotcha#23:Operator Function Lookup Anomaly56

Gotcha#24:Operator->Subtleties58

Chapter 3 The Preprocessor61

Gotcha#25:#define Literals61

Gotcha#26:#define Pseudofunctions64

Gotcha#27:Overuse of#if66

Gotcha#28:Side Effects in Assertions72

Chapter 4 Conversions75

Gotcha#29:Converting through void75

Gotcha#30:Slicing79

Gotcha#31:Misunderstanding Pointer-to-Const Conversion81

Gotcha#32:Misunderstanding Pointer-to-Pointer-to-Const Conversion82

Gotcha#33:Misunderstanding Pointer-to-Pointer-to-Base Conversion86

Gotcha#34:Pointer-to-Multidimensional-Array Problems87

Gotcha#35:Unchecked Downcasting89

Gotcha#36:Misusing Conversion Operators90

Gotcha#37:Unintended Constructor Conversion95

Gotcha#38:Casting under Multiple Inheritance98

Gotcha#39:Casting Incomplete Types100

Gotcha#40:Old-Style Casts102

Gotcha#41:Static Casts103

Gotcha#42:Temporary Initialization of Formal Arguments106

Gotcha#43:Temporary Lifetime110

Gotcha#44:References and Temporaries112

Gotcha#45:Ambiguity Failure of dynamic_cast116

Gotcha#46:Misunderstanding Contravariance120

Chapter 5 Initialization125

Gotcha#47:Assignment/Initialization Confusion125

Gotcha#48:Improperly Scoped Variables129

Gotcha#49:Failure to Appreciate C++ s Fixation on Copy Operations132

Gotcha#50:Bitwise Copy of Class Objects136

Gotcha#51:Confusing Initialization and Assignment in Constructors139

Gotcha#52:Inconsistent Ordering of the Member Initialization List141

Gotcha#53:Virtual Base Default Initialization142

Gotcha#54:Copy Constructor Base Initialization147

Gotcha#55:Runtime Static Initialization Order150

Gotcha#56:Direct versus Copy Initialization153

Gotcha#57:Direct Argument Initialization156

Gotcha#58:Ignorance of the Return Value Optimizations158

Gotcha#59:Initializing a Static Member in a Constructor163

Chapter 6 Memory and Resource Management167

Gotcha#60:Failure to Distinguish Scalar and Array Allocation167

Gotcha#61:Checking for Allocation Failure171

Gotcha#62:Replacing Global New and Delete173

Gotcha#63:Confusing Scope and Activation of Member new and delete176

Gotcha#64:Throwing String Literals177

Gotcha#65:Improper Exception Mechanics180

Gotcha#66:Abusing Local Addresses185

Gotcha#67:Failure to Employ Resource Acquisition Is Initialization190

Gotcha#68:Improper Use of auto_ptr195

Chapter 7 Polymorphism199

Gotcha#69:Type Codes199

Gotcha#70:Nonvirtual Base Class Destructor204

Gotcha#71:Hiding Nonvirtual Functions209

Gotcha#72:Making Template Methods Too Flexible212

Gotcha#73:Overloading Virtual Functions214

Gotcha#74:Virtual Functions with Default Argument Initializers216

Gotcha#75:Calling Virtual Functions in Constructors and Destructors218

Gotcha#76:Virtual Assignment220

Gotcha#77:Failure to Distinguish among Overloading,Overriding,and Hiding224

Gotcha#78:Failure to Grok Virtual Functions and Overriding230

Gotcha#79:Dominance Issues236

Chapter 8 Class Design241

Gotcha#80:Get/Set Interfaces241

Gotcha#81:Const and Reference Data Members245

Gotcha#82:Not Understanding the Meaning of Const Member Functions248

Gotcha#83:Failure to Distinguish Aggregation and Acquaintance253

Gotcha#84:Improper Operator Overloading258

Gotcha#85:Precedence and Overloading261

Gotcha#86:Friend versus Member Operators262

Gotcha#87:Problems with Increment and Decrement264

Gotcha#88:Misunderstanding Templated Copy Operations268

Chapter 9 Hierarchy Design271

Gotcha#89:Arrays of Class Objects271

Gotcha#90:Improper Container Substitutability273

Gotcha#91:Failure to Understand Protected Access277

Gotcha#92:Public Inheritance for Code Reuse281

Gotcha#93:Concrete Public Base Classes285

Gotcha#94:Failure to Employ Degenerate Hierarchies286

Gotcha#95:Overuse of Inheritance287

Gotcha#96:Type-Based Control Structures292

Gotcha#97:Cosmic Hierarchies295

Gotcha#98:Asking Personal Questions of an Object299

Gotcha#99:Capability Queries302

Bibliography307

Index309

热门推荐