图书介绍

C++ Primer 第4版 评注版 英文2025|PDF|Epub|mobi|kindle电子书版本百度云盘下载

C++ Primer 第4版 评注版 英文
  • (美)李普曼著 著
  • 出版社: 北京:电子工业出版社
  • ISBN:9787121174414
  • 出版时间:2012
  • 标注页数:662页
  • 文件大小:209MB
  • 文件页数:689页
  • 主题词:C语言-程序设计-教材

PDF下载


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

下载说明

C++ Primer 第4版 评注版 英文PDF格式电子书版下载

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

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

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

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

图书目录

Chapter 1 Getting Started(新增评注29条)1

1.1 Writing a Simple C++ Program2

1.1.1 Compiling and Executing Our Program3

1.2 A First Look at Input/Output5

1.2.1 Standard Input and Output Objects5

1.2.2 A Program that Uses the IO Library5

1.3 A Word About Comments8

1.4 Control Structures10

1.4.1 The while Statement10

1.4.2 The for Statement12

1.4.3 The if Statement14

1.4.4 Reading an Unknown Number of Inputs15

1.5 Introducing Classes17

1.5.1 The Sales_item Class17

1.5.2 A First Look at Member Functions20

1.6 The C++ Program21

Part Ⅰ The Basics23

Chapter 2 Variables and Basic Types(新增评注42条)25

2.1 Primitive Built-in Types26

2.1.1 Integral Types26

2.1.2 Floating-Point Types28

2.2 Literal Constants29

2.3 Variables33

2.3.1 What Is a Variable?34

2.3.2 The Name of a Variable36

2.3.3 Defining Objects37

2.3.4 Variable Initialization Rules39

2.3.5 Declarations and Definitions41

2.3.6 Scope of a Name42

2.3.7 Define Variables Where They Are Used43

2.4 const Qualifier44

2.5 References46

2.6 Typedef Names48

2.7 Enumerations48

2.8 Class Types49

2.9 Writing Our Own Header Files52

2.9.1 Designing Our Own Headers53

2.9.2 A Brief Introduction to the Preprocessor55

Chapter 3 Library Types(新增评注30条)59

3.1 Namespace using Declarations60

3.2 Library string Type62

3.2.1 Defining and Initializing strings62

3.2.2 Reading and Writing strings62

3.2.3 Operations on strings64

3.2.4 Dealing with the Characters of a string68

3.3 Library vector Type70

3.3.1 Defining and Initializing vectors70

3.3.2 Operations on vectors72

3.4 Introducing Iterators74

3.4.1 Iterator Arithmetic78

3.5 Library bitset Type79

3.5.1 Defining and Initializing bitsets79

3.5.2 Operations on bitsets81

Chapter 4 Arrays and Pointers(新增评注33条)85

4.1 Arrays86

4.1.1 Defining and Initializing Arrays86

4.1.2 Operations on Arrays89

4.2 Introducing Pointers89

4.2.1 What Is a Pointer?90

4.2.2 Defining and Initializing Pointers91

4.2.3 Operations on Pointers94

4.2.4 Using Pointers to Access Array Elements96

4.2.5 Pointers and the const Qualifier99

4.3 C-Style Character Strings102

4.3.1 Dynamically Allocating Arrays106

4.3.2 Interfacing to Older Code110

4.4 Multidimensioned Arrays111

4.4.1 Pointers and Multidimensioned Arrays113

Chapter 5 Expressions(新增评注49条)115

5.1 Arithmetic Operators117

5.2 Relational and Logical Operators119

5.3 The Bitwise Operators121

5.3.1 Using bitset Objects or Integral Values123

5.3.2 Using the Shift Operators for IO124

5.4 Assignment Operators125

5.4.1 Assignment Is Right Associative125

5.4.2 Assignment Has Low Precedence126

5.4.3 Compound Assignment Operators127

5.5 Increment and Decrement Operators127

5.6 The Arrow Operator129

5.7 The Conditional Operator130

5.8 The sizeof Operator131

5.9 Comma Operator132

5.10 Evaluating Compound Expressions132

5.10.1 Precedence132

5.10.2 Associativity133

5.10.3 Order of Evaluation135

5.11 The new and delete Expressions137

5.12 Type Conversions140

5.12.1 When Implicit Type Conversions Occur141

5.12.2 The Arithmetic Conversions142

5.12.3 Other Implicit Conversions143

5.12.4 Explicit Conversions145

5.12.5 When Casts Might Be Useful145

5.12.6 Named Casts145

5.12.7 Old-Style Casts147

Chapter 6 Statements(新增评注29条)149

6.1 Simple Statements150

6.2 Declaration Statements151

6.3 Compound Statements(Blocks)151

6.4 Statement Scope152

6.5 The if Statement153

6.5.1 The if Statement else Branch154

6.6 The switch Statement156

6.6.1 Using a switch156

6.6.2 Control Flow within a switch157

6.6.3 The default Label158

6.6.4 switch Expression and Case Labels159

6.6.5 Variable Definitions inside a switch159

6.7 The while Statement160

6.8 The for Loop Statement162

6.8.1 Omitting Parts of the for Header163

6.8.2 Multiple Definitions in the forHeader164

6.9 The do while Statement165

6.10 The break Statement166

6.11 The continue Statement167

6.12 The goto Statement168

6 13 try Blocks and Exception Handling169

6.13.1 A throw Expression169

6.13.2 The try Block170

6.13.3 Standard Exceptions172

6.14 Using the Preprocessorfor Debugging173

Chapter 7 Functions(新增评注56条)175

7.1 Defining a Function176

7.1.1 Function Return Type177

7.1.2 Function Parameter List178

7.2 Argument Passing179

7.2.1 Nonreference Parameters179

7.2.2 Reference Parameters181

7.2.3 vector and Other Container Parameters185

7.2.4 Array Parameters186

7.2.5 Managing Arrays Passed to Functions188

7.2.6 main:Handling Command-Line Options190

7.2.7 Functions with Varying Parameters191

7.3 The return Statement191

7.3.1 Functions with No Return Value191

7.3.2 Functions that Return a Value192

7.3.3 Recursion195

7.4 Function Declarations196

7.4.1 Default Arguments197

7.5 Local Objects199

7.5.1 Automatic Objects199

7.5.2 Static Local Objects200

7.6 Inline Functions200

7.7 Class Member Functions202

7.7.1 Defining the Body of a Member Function203

7.7.2 Defining a Member Function Outside the Class204

7.7.3 Writing the Sales item Constructor205

7.7.4 Organizing Class Code Files207

7.8 Overloaded Functions208

7.8.1 Overloading and Scope210

7.8.2 Function Matching and Argument Conversions211

7.8.3 The Three Steps in Overload Resolution212

7.8.4 Argument-Type Conversions214

7.9 Pointers to Functions217

Chapter 8 The IO Library(新增评注11条)221

8.1 An Object-Oriented Library222

8.2 Condition States224

8.3 Managing the Output Buffer227

8 4 File Input and Output229

8.4.1 Using File Stream Objects229

8.4.2 File Modes232

8.4.3 A Program to Open and Check Input Files234

8.5 String Streams234

Part Ⅱ Containers and Algorithms237

Chapter 9 Sequential Containers(新增评注54条)239

9.1 Defining a Sequential Container240

9.1.1 Initializing Container Elements241

9.1.2 Constraints on Types that a Container Can Hold243

9.2 Iterators and Iterator Ranges244

9.2.1 Iterator Ranges246

9.2.2 Some Container Operations Invalidate Iterators247

9.3 Sequence Container Operations248

9.3.1 Container Typedefs248

9.3.2 begin and end Members249

9.3.3 Adding Elements to a Sequential Container249

9.3.4 Relational Operators252

9.3.5 Container Size Operations254

9.3.6 Accessing Elements255

9.3.7 Erasing Elements256

9.3.8 Assignment and swap258

9.4 How a vector Grows259

9.4.1 capacity and reserve Members260

9.5 Deciding Which Container to Use262

9.6 strings Revisited264

9.6.1 Other Ways to Construct strings266

9.6.2 Other Ways to Change a string267

9.6.3 string-Only Operations268

9.6.4 string Search Operations270

9.6.5 Comparing strings272

9.7 Container Adaptors274

9.7.1 Stack Adaptor275

9.7.2 Queue and Priority Queue276

Chapter 10 Associative Containers(新增评注22条)279

10.1 Preliminaries:the pair Type280

10.2 Associative Containers282

10.3 The map Type283

10.3.1 Defining a map283

10.3.2 Types Defined by map284

10.3.3 Adding Elements to a map285

10.3.4 Subscripting a map285

10.3.5 Using map::insert287

10.3.6 Finding and Retrieving a map Element289

10.3.7 Erasing Elements from a map290

10.3.8 Iterating across a map290

10.3.9 A Word Transformation Map291

10.4 The set Type293

10.4.1 Defining and Using sets293

10.4.2 Building a Word-Exclusion Set295

10.5 The multimap and multiset Types296

10.5.1 Adding and Removing Elements296

10.5.2 Finding Elements in a multimap or multiset296

10.6 Using Containers:Text-Query Program299

10.6.1 Design of the Query Program300

10.6.2 TextQuery Class301

10.6.3 Using the TextQuery Class302

10.6.4 Writing the Member Functions304

Chapter 11 Generic Algorithms(新增评注18条)307

11.1 Overview308

11.2 A First Look at the Algorithms311

11.2.1 Read-Only Algorithms311

11.2.2 Algorithms that Write Container Elements313

11.2.3 Algorithms that Reorder Container Elements315

11.3 Revisiting Iterators319

11.3.1 Insert Iterators319

11.3.2 iostream Iterators320

11.3.3 Reverse Iterators324

11.3.4 const Iterators327

11.3.5 The Five Iterator Categories327

11.4 Structure of Generic Algorithms330

11.4.1 Algorithm Parameter Patterns330

11.4.2 Algorithm Naming Conventions331

11.5 Container-Specific Algorithms332

Part Ⅲ Classes and Data Abstraction335

Chapter 12 Classes(新增评注26条)337

12.1 Class Definitions and Declarations338

12.1.1 Class Definitions:A Recap338

12.1.2 Data Abstraction and Encapsulation339

12.1.3 More on Class Definitions341

12.1.4 Class Declarations versus Definitions344

12.1.5 Class Objects345

12.2 The Implicit this Pointer346

12.3 Class Scope349

12.3.1 Name Lookup in Class Scope351

12.4 Constructors355

12.4.1 The Constructor Initializer357

12.4.2 Default Arguments and Constructors360

12.4.3 The Default Constructor361

12.4.4 Implicit Class-Type Conversions363

12.4.5 Explicit Initialization of Class Members365

12.5 Friends366

12.6 static Class Members368

12.6.1 static Member Functions369

12.6.2 static Data Members370

Chapter 13 Copy Control(新增评注30条)373

13.1 The Copy Constructor374

13.1.1 The Synthesized Copy Constructor377

13.1.2 Defining Our Own Copy Constructor377

13.1.3 Preventing Copies378

13.2 The Assignment Operator379

13.3 The Destructor380

13.4 A Message-Handling Example382

13.5 Managing Pointer Members387

13.5.1 Defining Smart Pointer Classes389

13.5.2 Defining Valuelike Classes393

Chapter 14 Overloaded Operations and Conversions(新增评注31条)395

14.1 Defining an Overloaded Operator396

14.1.1 Overloaded Operator Design399

14.2 Input and Output Operators402

14.2.1 Overloading the Output Operator<<402

14.2.2 Overloading the Input Operator>>404

14.3 Arithmetic and Relational Operators405

14.3.1 Equality Operators406

14.3.2 Relational Operators407

14.4 Assignment Operators408

14.5 Subscript Operator409

14.6 Member Access Operators410

14.7 Increment and Decrement Operators413

14.8 Call Operator and Function Objects416

14.8.1 Using Function Objects with Library Algorithms417

14.8.2 Library-Defined Function Objects418

14.8.3 Function Adaptors for Function Objects419

14.9 Conversions and Class Types420

14.9.1 Why Conversions Are Useful421

14.9.2 Conversion Operators421

14.9.3 Argument Matching and Conversions424

14.9.4 Overload Resolution and Class Arguments427

14.9.5 Overloading,Conversions,and Operators430

Part Ⅳ Object-Oriented and Generic Programming435

Chapter 15 Object-Oriented Programming(新增评注56条)437

15.1 OOP:An Overview438

15.2 Defining Base and Derived Classes439

15.2.1 Defining a Base Class440

15.2.2 protected Members441

15.2.3 Derived Classes442

15.2.4 virtual and Other Member Functions445

15.2.5 Public,Private,and Protected Inheritance448

15.2.6 Friendship and Inheritance452

15.2.7 Inheritance and Static Members452

15.3 Conversions and Inheritance453

15.3.1 Derived-to-Base Conversions453

15.3.2 Conversions from Base to Derived455

15.4 Constructors and Copy Control456

15.4.1 Base-Class Constructors and Copy Control456

15.4.2 Derived-Class Constructors456

15.4.3 Copy Control and Inheritance459

15.4.4 Virtual Destructors462

15.4.5 Virtuals in Constructors and Destructors463

15.5 Class Scope under Inheritance464

15.5.1 Name Lookup Happens at CompileTime464

15.5.2 Name Collisions and Inheritance465

15.5.3 Scope and Member Functions466

15.5.4 Virtual Functions and Scope467

15.6 Pure Virtual Functions468

15.7 Containers and Inheritance469

15.8 Handle Classes and Inheritance470

15.8.1 A Pointerlike Handle471

15.8.2 Cloning an Unknown Type473

15.8.3 Using the Handle475

15.9 Text Queries Revisited478

15.9.1 An Object-Oriented Solution479

15.9.2 A Valuelike Handle480

15.9.3 The Query_base Class482

15.9.4 The Query Handle Class483

15.9.5 The Derived Classes485

15.9.6 The eval Functions487

Chapter 16 Templates and Generic Programming(新增评注31条)491

16.1 Template Definitions492

16.1.1 Defining a Function Template492

16.1.2 Defining a Class Template494

16.1.3 Template Parameters495

16.1.4 Template Type Parameters497

16.1.5 Nontype Template Parameters499

16.1.6 Writing Generic Programs500

16.2 Instantiation501

16.2.1 Template Argument Deduction503

16.2.2 Function-Template Explicit Arguments506

16.3 Template Compilation Models508

16.4 Class Template Members511

16.4.1 Class-Template Member Functions513

16.4.2 Template Arguments for Nontype Parameters517

16.4.3 Friend Declarations in Class Templates517

16.4.4 Queue and Queue Item Friend Declarations520

16.4.5 Member Templates522

16.4.6 The Complete Queue Class524

16.4.7 static Members of Class Templates525

16.5 A Generic Handle Class526

16.5.1 Defining the Handle Class527

16.5.2 Using the Handle528

16.6 Template Specializations530

16.6.1 Specializing a Function Template531

16.6.2 Specializing a Class Template533

16.6.3 Specializing Members but Not the Class535

16.6.4 Class-Template Partial Specializations536

16.7 Overloading and Function Templates537

Part Ⅴ Advanced Topics541

Chapter 17 Tools for Large Programs(新增评注37条)543

17.1 Exception Handling544

17.1.1 Throwing an Exception of Class Type545

17.1.2 Stack Unwinding546

17.1.3 Catching an Exception548

17.1.4 Rethrow549

17.1.5 The Catch-All Handler550

17.1.6 Function Try Blocks and Constructors550

17.1.7 Exception Class Hierarchies551

17.1.8 Automatic Resource Deallocation553

17.1.9 The auto_ptr Class555

17.1.10 Exception Specifications559

17.1.11 Function Pointer Exception Specifications562

17.2 Namespaces563

17.2.1 Namespace Definitions563

17.2.2 Nested Namespaces567

17.2.3 Unnamed Namespaces568

17.2.4 Using Namespace Members569

17.2.5 Classes,Namespaces,and Scope573

17.2.6 Overloading and Namespaces575

17.2.7 Namespaces and Templates578

17.3 Multiple and Virtual Inheritance578

17.3.1 Multiple Inheritance578

17.3.2 Conversions and Multiple Base Classes581

17.3.3 Copy Control for Multiply Derived Classes583

17.3.4 Class Scope under Multiple Inheritance583

17.3.5 Virtual Inheritance586

17.3.6 Virtual Base Class Declaration587

17.3.7 Special Initialization Semantics589

Chapter 18 Specialized Tools and Techniques(新增评注22条)593

18.1 Optimizing Memory Allocation594

18.1.1 Memory Allocation in C++594

18.1.2 The allocator Class595

18.1.3 operator new and operator delete Functions598

18.1.4 Placement new Expressions600

18.1.5 Explicit Destructor Invocation601

18.1.6 Class Specific new and delete601

18.1.7 A Memory-Allocator Base Class603

18.2 Run-Time Type Identification608

18.2.1 The dynamic_cast Operator609

18.2.2 The typeid Operator611

18.2.3 Using RTTI612

18.2.4 The type_info Class614

18.3 Pointer to Class Member615

18.3.1 Declaring a Pointer to Member615

18.3.2 Using a Pointer to Class Member617

18.4 Nested Classes620

18.4.1 A Nested-Class Implementation620

18.4.2 Name Lookup in Nested Class Scope623

18.5 Union:A Space-Saving Class625

18.6 Local Classes627

18.7 Inherently Nonportable Features629

18.7.1 Bit-fields629

18.7.2 volatile Qualifier630

18.7.3 Linkage Directives:extern"C"632

Appendix A The Library635

A.1 Library Names and Headers636

A.2 A Brief Tour of the Algorithms637

A.2.1 Algorithms to Find an Object637

A.2.2 Other Read-Only Algorithms638

A.2.3 Binary-Search Algorithms639

A.2.4 Algorithms that Write Container Elements639

A.2.5 Partitioning and Sorting Algorithms641

A.2.6 General Reordering Operations643

A.2.7 Permutation Algorithms644

A.2.8 Set Algorithms for Sorted Sequences645

A.2.9 Minimum and Maximum Values646

A.2.10 Numeric Algorithms646

A.3 The IO Library Revisited648

A.3.1 Format State648

A.3.2 Many Manipulators Change the Format State648

A.3.3 Controlling Output Formats649

A.3.4 Controlling Input Formatting654

A.3.5 Unformatted Input/Output Operations655

A.3.6 Single-Byte Operations655

A.3.7 Multi-Byte Operations656

A.3.8 Random Access to a Stream658

A.3.9 Reading and Writing to the Same File660

热门推荐