《Essential C++注释版》PDF下载

  • 购买积分:11 如何计算积分?
  • 作  者:(美)斯坦利著
  • 出 版 社:北京:机械工业出版社
  • 出版年份:2010
  • ISBN:9787111312215
  • 页数:290 页
图书介绍:本书是学习C++的经典教程。不仅备受C++之父等国外专家的推崇,而且也得到了侯捷、孟岩、荣耀等国内C++专家的喜爱。翻译版、影印版分别有华中科大和人民邮电出版后,多次重印,至今畅销不衰。时至2009年,仍有读者在Amazon上评论:“如果需要复习C++知识技能的话,这本书是首选”。足见其生命力之强。本书作者是畅销图书《C++ Primer (3RD)中文版》的作者Stanley B. Lippman,其职业是提供关于C++和面向对象的训练、咨询、设计和指导。2009年,他来上海参加C++大会,引发技术界一时轰动。此次,我们将在英文原版的基础上,总结《代码质量》注释版的成功经验,对难点和要点加以注释,面向高等院校学生和专业人员市场销售。

Chapter 1:Basic C++ Programming 1

1.1:How to Write a C++ Program 1

1.2:Defining and Initializing a Data Object 7

1.3:Writing Expressions 10

1.4:Writing Conditional and Loop Statements 15

1.5:How to UseArrays and Vectors 22

1.6:Pointers Allow for Flexibility 26

1.7:Writing and Reading Files 30

Chapter 2:Procedural Programming 35

2.1:How to Write a Function 35

2.2:Invoking a Function 41

2.3:Providing Default Parameter Values 50

2.4:Using Local Static Objects 53

2.5:Declaring a Function Inline 55

2.6:Providing Overloaded Functions 56

2.7:Defining and Using Template Functions 58

2.8:Pointers to FunctionsAdd Flexiblity 60

2.9:Setting Up a Header File 63

Chapter 3:Generic Programming 67

3.1:The Arithrnetic of Pointers 68

3.2:Making Sense of Iterators 73

3.3:Operations Common to All Containers 76

3.4:Using the Sequential Containers 77

3.5:Using the Generic Algorithms 81

3.6:How to Design a Generic Algorithm 83

3.7:Using a Map 90

3.8:Using a Set 91

3.9:How to Use Iterator Inserters 93

3.10:Using the iostream Iterators 95

Chapter 4:Object-Based Programming 99

4.1:How to Implement a Class 100

4.2:What Are Class Constructors and the Class Destructor? 104

4.3:What Are mutable and const? 109

4.4:What Is the this Pointer? 113

4.5:Static Class Members 115

4.6:Building an Iterator Class 118

4.7:Collaboration Sometimes Requires Friendship 123

4.8:Implementing a Copy Assignment Operator 125

4.9:Implementing a Function Object 126

4.10:Providing Class Instances of the iostrearn Operators 128

4.11:Pointers to Class Member Functions 130

Chapter 5:Object-Oriented Programming 135

5.1:Object-Oriented Programming Concepts 135

5.2:ATour of Object-Oriented Programming 138

5.3:Polymorphism without Inheritance 142

5.4:Defining an Abstract Base Class 145

5.5:Defining a Derived Class 148

5.6:Using an Inheritance Hierarchy 155

5.7:How Abstract Should a Base Class Be? 157

5.8:Initialization,Destruction,and Copy 158

5.9:Defining a Derived Class Virtual Function 160

5.10:Run-Time Type Identification 164

Chapter 6:Programming with Templates 167

6.1:Parameterized Types 169

6.2:The Template Class Definition 171

6.3:Handling Template Type Parameters 172

6.4:Implementing the Template Class 174

6.5:AFunction Template Output Operator 180

6.6:Constant Expressions and Default Parameters 181

6.7:Template Parameters as Strategy 185

6.8:Member Template Functions 187

Chapter 7:Exception Handling 191

7.1:Throwing an Exception 191

7.2:Catching an Exception 193

7.3:Trying for an Exception 194

7.4:Local Resource Management 198

7.5:The Standard Exceptions 200

Appendix A:Exercise Solutions 205

Appendix B:Generic Algorithms Handbook 255

Index 271

注释 277