C++大学教程(第九版)(英文版)

C++大学教程(第九版)(英文版)
分享
扫描下方二维码分享到微信
打开微信,点击右上角”+“,
使用”扫一扫“即可将网页分享到朋友圈。
作者: , , , , , ,
2019-03
版次: 1
ISBN: 9787121295423
定价: 159.00
装帧: 平装
开本: 16开
纸张: 胶版纸
页数: 860页
字数: 2035千字
正文语种: 英语
66人买过
  • 本书是一本C++编程方面的优秀教材,全面介绍了面向对象编程的原理与方法,详细分析了与C++编程有关的技术。本书的主要内容包括类与对象、控制语句、函数与递归、数组、指针、运算符重载、继承、多态、输入/输出流、异常处理、文件处理、模板、搜索与排序等。全书以“活代码”的方式详细分析了每个知识要点,提供了丰富的自测练习和项目练习,是初学者和中高级程序员学习C++编程的理想用书。 Paul Deitel和Harvey Deitel是全球畅销的编程语言教材和专业图书作家,“How to Program”系列是其*负盛名的一套计算机编程教材,已经销售近40年,并被翻译成中文在内的十几种语言。他们成立的Deitel & Associates公司是一家国际知名的企业培训和写作公司,专门进行计算机编程语言、对象技术、移动应用开发及Internet和Web软件技术方面的培训和写作,出版了一流的编程专业的大学教材、 专业图书以及LiveLessons视频课程。
    Paul Deitel和Harvey Deitel是全球畅销的编程语言教材和专业图书作家,“How to Program”系列是其*负盛名的一套计算机编程教材,已经销售近40年,并被翻译成中文在内的十几种语言。他们成立的Deitel & Associates公司是一家国际知名的企业培训和写作公司,专门进行计算机编程语言、对象技术、移动应用开发及Internet和Web软件技术方面的培训和写作,出版了一流的编程专业的大学教材、 专业图书以及LiveLessons视频课程。 Contents

    Chapter 1 Introduction to Computers and C++ 1

    1.1 Introduction 2

    1.2 Computers and the Internet in Industry and Research 2

    1.3 Hardware and Software 4

    1.4 Data Hierarchy 6

    1.5 Machine Languages, Assembly Languages and High-Level Languages 7

    1.6 C++ 8

    1.7 Programming Languages 9

    1.8 Introduction to Object Technology 10

    1.9 Typical C++ Development Environment 13

    1.10 Test-Driving a C++ Application 15

    1.11 Operating Systems 20

    1.12 The Internet and World Wide Web 22

    1.13 Some Key Software Development Terminology 23

    1.14 C++11 and the Open Source Boost Libraries 25

    1.15 Keeping Up to Date with Information Technologies 25

    1.16 Web Resources 26

    Chapter 2 Introduction to C++ Programming; Input/Output and Operators 31

    2.1 Introduction 31

    2.2 First Program in C++: Printing a Line of Text 32

    2.3 Modifying Our First C++ Program 35

    2.4 Another C++ Program: Adding Integers 36

    2.5 Memory Concepts 39

    2.6 Arithmetic 40

    2.7 Decision Making: Equality and Relational Operators 43

    2.8 Wrap-Up 47

    Chapter 3 Introduction to Classes, Objects and Strings 55

    3.1 Introduction 55

    3.2 Defining a Class with a Member Function 56

    3.3 Defining a Member Function with a Parameter 58

    3.4 Data Members, set Member Functions and get Member Functions 61

    3.5 Initializing Objects with Constructors 66

    3.6 Placing a Class in a Separate File for Reusability 69

    3.7 Separating Interface from Implementation 72

    3.8 Validating Data with set Functions 76

    3.9 Wrap-Up 80

    Chapter 4 Control Statements: Part 1; Assignment, ++ and - - Operators 87

    4.1 Introduction 87

    4.2 Algorithms 88

    4.3 Pseudocode 88

    4.4 Control Structures 89

    4.5 if Selection Statement 92

    4.6 if…else Double-Selection Statement 93

    4.7 while Repetition Statement 97

    4.8 Formulating Algorithms: Counter-Controlled Repetition 98

    4.9 Formulating Algorithms: Sentinel-Controlled Repetition 103

    4.10 Formulating Algorithms: Nested Control Statements 111

    4.11 Assignment Operators 116

    4.12 Increment and Decrement Operators 116

    4.13 Wrap-Up 118

    Chapter 5 Control Statements: Part 2; Logical Operators 131

    5.1 Introduction 131

    5.2 Essentials of Counter-Controlled Repetition 132

    5.3 for Repetition Statement 133

    5.4 Examples Using the for Statement 136

    5.5 do…while Repetition Statement 140

    5.6 switch Multiple-Selection Statement 141

    5.7 break and continue Statements 148

    5.8 Logical Operators 150

    5.9 Confusing the Equality (==) and Assignment (=) Operators 153

    5.10 Structured Programming Summary 154

    5.11 Wrap-Up 158

    Chapter 6 Functions and an Introduction to Recursion 167

    6.1 Introduction 168

    6.2 Program Components in C++ 168

    6.3 Math Library Functions 169

    6.4 Function Definitions with Multiple Parameters 170

    6.5 Function Prototypes and Argument Coercion 174

    6.6 C++ Standard Library Headers 176

    6.7 Case Study: Random Number Generation 177

    6.8 Case Study: Game of Chance; Introducing enum 182

    6.9 C++11 Random Numbers 185

    6.10 Storage Classes and Storage Duration 186

    6.11 Scope Rules 189

    6.12 Function Call Stack and Activation Records 191

    6.13 Functions with Empty Parameter Lists 194

    6.14 Inline Functions 195

    6.15 References and Reference Parameters 196

    6.16 Default Arguments 198

    6.17 Unary Scope Resolution Operator 200

    6.18 Function Overloading 200

    6.19 Function Templates 203

    6.20 Recursion 205

    6.21 Example Using Recursion: Fibonacci Series 208

    6.22 Recursion vs. Iteration 210

    6.23 Wrap-Up 213

    Chapter 7 Class Templates array and vector; Catching Exceptions 232

    7.1 Introduction 233

    7.2 arrays 233

    7.3 Declaring arrays 234

    7.4 Examples Using arrays 235

    7.5 Range-Based for Statement 244

    7.6 Case Study: Class GradeBook Using an array to Store Grades 246

    7.7 Sorting and Searching arrays 251

    7.8 Multidimensional arrays 252

    7.9 Case Study: Class GradeBook Using a Two-Dimensional array 255

    7.10 Introduction to C++ Standard Library Class Template vector 260

    7.11 Wrap-Up 264

    Chapter 8 Pointers 279

    8.1 Introduction 280

    8.2 Pointer Variable Declarations and Initialization 280

    8.3 Pointer Operators 281

    8.4 Pass-by-Reference with Pointers 283

    8.5 Built-In Arrays 287

    8.6 Using const with Pointers 289

    8.7 sizeof Operator 292

    8.8 Pointer Expressions and Pointer Arithmetic 294

    8.9 Relationship Between Pointers and Built-In Arrays 296

    8.10 Pointer-Based Strings 299

    8.11 Wrap-Up 301

    Chapter 9 Classes: A Deeper Look; Throwing Exceptions 316

    9.1 Introduction 317

    9.2 Time Class Case Study 317

    9.3 Class Scope and Accessing Class Members 323

    9.4 Access Functions and Utility Functions 324

    9.5 Time Class Case Study: Constructors with Default Arguments 324

    9.6 Destructors 328

    9.7 When Constructors and Destructors Are Called 329

    9.8 Time Class Case Study: A Subtle Trap― Returning a Reference or a Pointer to a private

    Data Member 331

    9.9 Default Memberwise Assignment 334

    9.10 const Objects and const Member Functions 335

    9.11 Composition: Objects as Members of Classes 337

    9.12 friend Functions and friend Classes 341

    9.13 Using the this Pointer 343

    9.14 static Class Members 347

    9.15 Wrap-Up 351

    Chapter 10 Operator Overloading; Class string 361

    10.1 Introduction 362

    10.2 Using the Overloaded Operators of Standard Library Class string 362

    10.3 Fundamentals of Operator Overloading 365

    10.4 Overloading Binary Operators 366

    10.5 Overloading the Binary Stream Insertion and Stream Extraction Operators 367

    10.6 Overloading Unary Operators 370

    10.7 Overloading the Unary Prefix and Postfix ++ and -- Operators 370

    10.8 Case Study: A Date Class 371

    10.9 Dynamic Memory Management 375

    10.10 Case Study: Array Class 377

    10.11 Operators as Member vs. Non-Member Functions 387

    10.12 Converting Between Types 388

    10.13 explicit Constructors and Conversion Operators 389

    10.14 Overloading the Function Call Operator () 391

    10.15 Wrap-Up 392

    Chapter 11 Object-Oriented Programming: Inheritance 402

    11.1 Introduction 402

    11.2 Base Classes and Derived Classes 403

    11.3 Relationship between Base and Derived Classes 405

    11.4 Constructors and Destructors in Derived Classes 422

    11.5 public, protected and private Inheritance 424

    11.6 Software Engineering with Inheritance 425

    11.7 Wrap-Up 425

    Chapter 12 Object-Oriented Programming: Polymorphism 431

    12.1 Introduction 432

    12.2 Introduction to Polymorphism: Polymorphic Video Game 432

    12.3 Relationships Among Objects in an Inheritance Hierarchy 433

    12.4 Type Fields and switch Statements 443

    12.5 Abstract Classes and Pure virtual Functions 444

    12.6 Case Study: Payroll System Using Polymorphism 445

    12.7 (Optional) Polymorphism, Virtual Functions and Dynamic Binding “Under the Hood” 456

    12.8 Case Study: Payroll System Using Polymorphism and Runtime Type Information with

    Downcasting, dynamic_cast, typeid and type_info 459

    12.9 Wrap-Up 462

    Chapter 13 Stream Input/Output: A Deeper Look 468

    13.1 Introduction 469

    13.2 Streams 469

    13.3 Stream Output 472

    13.4 Stream Input 473

    13.5 Unformatted I/O Using read, write and gcount 476

    13.6 Introduction to Stream Manipulators 477

    13.7 Stream Format States and Stream Manipulators 481

    13.8 Stream Error States 488

    13.9 Tying an Output Stream to an Input Stream 490

    13.10 Wrap-Up 490

    Chapter 14 File Processing 499

    14.1 Introduction 499

    14.2 Files and Streams 500

    14.3 Creating a Sequential File 500

    14.4 Reading Data from a Sequential File 504

    14.5 Updating Sequential Files 508

    14.6 Random-Access Files 508

    14.7 Creating a Random-Access File 509

    14.8 Writing Data Randomly to a Random-Access File 513

    14.9 Reading from a Random-Access File Sequentially 514

    14.10 Case Study: A Transaction-Processing Program 516

    14.11 Object Serialization 521

    14.12 Wrap-Up 521

    Chapter 15 Standard Library Containers and Iterators 530

    15.1 Introduction 531

    15.2 Introduction to Containers 532

    15.3 Introduction to Iterators 535

    15.4 Introduction to Algorithms 538

    15.5 Sequence Containers 539

    15.6 Associative Containers 550

    15.7 Container Adapters 557

    15.8 Class bitset 561

    15.9 Wrap-Up 562

    Chapter 16 Standard Library Algorithms 573

    16.1 Introduction 573

    16.2 Minimum Iterator Requirements 574

    16.3 Algorithms 575

    16.4 Function Objects 600

    16.5 Lambda Expressions 603

    16.6 Standard Library Algorithm Summary 604

    16.7 Wrap-Up 605

    Chapter 17 Exception Handling: A Deeper Look 613

    17.1 Introduction 613

    17.2 Example: Handling an Attempt to Divide by Zero 614

    17.3 Rethrowing an Exception 618

    17.4 Stack Unwinding 620

    17.5 When to Use Exception Handling 621

    17.6 Constructors, Destructors and Exception Handling 622

    17.7 Exceptions and Inheritance 622

    17.8 Processing new Failures 623

    17.9 Class unique_ptr and Dynamic Memory Allocation 625

    17.10 Standard Library Exception Hierarchy 627

    17.11 Wrap-Up 628

    Chapter 18 Introduction to Custom Templates 634

    18.1 Introduction 634

    18.2 Class Templates 635

    18.3 Function Template to Manipulate a Class-Template Specialization Object 638

    18.4 Nontype Parameters 640

    18.5 Default Arguments for Template Type Parameters 640

    18.6 Overloading Function Templates 640

    18.7 Wrap-Up 641

    Chapter 19 Custom Templatized Data Structures 644

    19.1 Introduction 644

    19.2 Self-Referential Classes 645

    19.3 Linked Lists 646

    19.4 Stacks 657

    19.5 Queues 660

    19.6 Trees 663

    19.7 Wrap-Up 669

    Chapter 20 Searching and Sorting 680

    20.1 Introduction 680

    20.2 Searching Algorithms 681

    20.3 Sorting Algorithms 687

    20.4 Wrap-Up 696

    Chapter 21 Class string and String Stream Processing: A Deeper Look 702

    21.1 Introduction 703

    21.2 string Assignment and Concatenation 704

    21.3 Comparing strings 705

    21.4 Substrings 707

    21.5 Swapping strings 708

    21.6 string Characteristics 708

    21.7 Finding Substrings and Characters in a string 710

    21.8 Replacing Characters in a string 711

    21.9 Inserting Characters into a string 713

    21.10 Conversion to Pointer-Based char * Strings 713

    21.11 Iterators 715

    21.12 String Stream Processing 715

    21.13 C++11 Numeric Conversion Functions 718

    21.14 Wrap-Up 719

    Chapter 22 Bits, Characters, C Strings and structs 726

    22.1 Introduction 727

    22.2 Structure Definitions 727

    22.3 typedef 728

    22.4 Example: Card Shuffling and Dealing Simulation 728

    22.5 Bitwise Operators 730

    22.6 Bit Fields 737

    22.7 Character-Handling Library 740

    22.8 C String-Manipulation Functions 744

    22.9 C String-Conversion Functions 749

    22.10 Search Functions of the C String-Handling Library 753

    22.11 Memory Functions of the C String-Handling Library 756

    22.12 Wrap-Up 759

    Chapter 23 Other Topics 773

    23.1 Introduction 773

    23.2 const_cast Operator 774

    23.3 mutable Class Members 775

    23.4 namespaces 776

    23.5 Operator Keywords 779

    23.6 Pointers to Class Members (.* and ->*) 781

    23.7 Multiple Inheritance 782

    23.8 Multiple Inheritance and virtual Base Classes 786

    23.9 Wrap-Up 789

    Appendix A Operator Precedence and Associativity 794

    Appendix B ASCII Character Set 796

    Appendix C Fundamental Types 797

    Appendix D Number Systems 799

    Appendix E Preprocessor 809

    Index 819



    本书的第24章~第26章、附录F~附录K请登录华信教育资源网(www.hxedu.com.cn)下载。

    Chapter 24 C++11: Additional Features

    Chapter 25 ATM Case Study, Part 1: Object-Oriented Design with the UML

    Chapter 26 ATM Case Study, Part 2: Implementing an Object-Oriented Design

    Appendix F C Legacy Code Topics

    Appendix G UML 2: Additional Diagram Types

    Appendix H Using the Visual Studio Debugger

    Appendix I Using the GNU C++ Debugger

    Appendix J Using the Xcode Debugger

    Appendix K Test Driving a C++ Program on Mac OS X
  • 内容简介:
    本书是一本C++编程方面的优秀教材,全面介绍了面向对象编程的原理与方法,详细分析了与C++编程有关的技术。本书的主要内容包括类与对象、控制语句、函数与递归、数组、指针、运算符重载、继承、多态、输入/输出流、异常处理、文件处理、模板、搜索与排序等。全书以“活代码”的方式详细分析了每个知识要点,提供了丰富的自测练习和项目练习,是初学者和中高级程序员学习C++编程的理想用书。
  • 作者简介:
    Paul Deitel和Harvey Deitel是全球畅销的编程语言教材和专业图书作家,“How to Program”系列是其*负盛名的一套计算机编程教材,已经销售近40年,并被翻译成中文在内的十几种语言。他们成立的Deitel & Associates公司是一家国际知名的企业培训和写作公司,专门进行计算机编程语言、对象技术、移动应用开发及Internet和Web软件技术方面的培训和写作,出版了一流的编程专业的大学教材、 专业图书以及LiveLessons视频课程。
    Paul Deitel和Harvey Deitel是全球畅销的编程语言教材和专业图书作家,“How to Program”系列是其*负盛名的一套计算机编程教材,已经销售近40年,并被翻译成中文在内的十几种语言。他们成立的Deitel & Associates公司是一家国际知名的企业培训和写作公司,专门进行计算机编程语言、对象技术、移动应用开发及Internet和Web软件技术方面的培训和写作,出版了一流的编程专业的大学教材、 专业图书以及LiveLessons视频课程。
  • 目录:
    Contents

    Chapter 1 Introduction to Computers and C++ 1

    1.1 Introduction 2

    1.2 Computers and the Internet in Industry and Research 2

    1.3 Hardware and Software 4

    1.4 Data Hierarchy 6

    1.5 Machine Languages, Assembly Languages and High-Level Languages 7

    1.6 C++ 8

    1.7 Programming Languages 9

    1.8 Introduction to Object Technology 10

    1.9 Typical C++ Development Environment 13

    1.10 Test-Driving a C++ Application 15

    1.11 Operating Systems 20

    1.12 The Internet and World Wide Web 22

    1.13 Some Key Software Development Terminology 23

    1.14 C++11 and the Open Source Boost Libraries 25

    1.15 Keeping Up to Date with Information Technologies 25

    1.16 Web Resources 26

    Chapter 2 Introduction to C++ Programming; Input/Output and Operators 31

    2.1 Introduction 31

    2.2 First Program in C++: Printing a Line of Text 32

    2.3 Modifying Our First C++ Program 35

    2.4 Another C++ Program: Adding Integers 36

    2.5 Memory Concepts 39

    2.6 Arithmetic 40

    2.7 Decision Making: Equality and Relational Operators 43

    2.8 Wrap-Up 47

    Chapter 3 Introduction to Classes, Objects and Strings 55

    3.1 Introduction 55

    3.2 Defining a Class with a Member Function 56

    3.3 Defining a Member Function with a Parameter 58

    3.4 Data Members, set Member Functions and get Member Functions 61

    3.5 Initializing Objects with Constructors 66

    3.6 Placing a Class in a Separate File for Reusability 69

    3.7 Separating Interface from Implementation 72

    3.8 Validating Data with set Functions 76

    3.9 Wrap-Up 80

    Chapter 4 Control Statements: Part 1; Assignment, ++ and - - Operators 87

    4.1 Introduction 87

    4.2 Algorithms 88

    4.3 Pseudocode 88

    4.4 Control Structures 89

    4.5 if Selection Statement 92

    4.6 if…else Double-Selection Statement 93

    4.7 while Repetition Statement 97

    4.8 Formulating Algorithms: Counter-Controlled Repetition 98

    4.9 Formulating Algorithms: Sentinel-Controlled Repetition 103

    4.10 Formulating Algorithms: Nested Control Statements 111

    4.11 Assignment Operators 116

    4.12 Increment and Decrement Operators 116

    4.13 Wrap-Up 118

    Chapter 5 Control Statements: Part 2; Logical Operators 131

    5.1 Introduction 131

    5.2 Essentials of Counter-Controlled Repetition 132

    5.3 for Repetition Statement 133

    5.4 Examples Using the for Statement 136

    5.5 do…while Repetition Statement 140

    5.6 switch Multiple-Selection Statement 141

    5.7 break and continue Statements 148

    5.8 Logical Operators 150

    5.9 Confusing the Equality (==) and Assignment (=) Operators 153

    5.10 Structured Programming Summary 154

    5.11 Wrap-Up 158

    Chapter 6 Functions and an Introduction to Recursion 167

    6.1 Introduction 168

    6.2 Program Components in C++ 168

    6.3 Math Library Functions 169

    6.4 Function Definitions with Multiple Parameters 170

    6.5 Function Prototypes and Argument Coercion 174

    6.6 C++ Standard Library Headers 176

    6.7 Case Study: Random Number Generation 177

    6.8 Case Study: Game of Chance; Introducing enum 182

    6.9 C++11 Random Numbers 185

    6.10 Storage Classes and Storage Duration 186

    6.11 Scope Rules 189

    6.12 Function Call Stack and Activation Records 191

    6.13 Functions with Empty Parameter Lists 194

    6.14 Inline Functions 195

    6.15 References and Reference Parameters 196

    6.16 Default Arguments 198

    6.17 Unary Scope Resolution Operator 200

    6.18 Function Overloading 200

    6.19 Function Templates 203

    6.20 Recursion 205

    6.21 Example Using Recursion: Fibonacci Series 208

    6.22 Recursion vs. Iteration 210

    6.23 Wrap-Up 213

    Chapter 7 Class Templates array and vector; Catching Exceptions 232

    7.1 Introduction 233

    7.2 arrays 233

    7.3 Declaring arrays 234

    7.4 Examples Using arrays 235

    7.5 Range-Based for Statement 244

    7.6 Case Study: Class GradeBook Using an array to Store Grades 246

    7.7 Sorting and Searching arrays 251

    7.8 Multidimensional arrays 252

    7.9 Case Study: Class GradeBook Using a Two-Dimensional array 255

    7.10 Introduction to C++ Standard Library Class Template vector 260

    7.11 Wrap-Up 264

    Chapter 8 Pointers 279

    8.1 Introduction 280

    8.2 Pointer Variable Declarations and Initialization 280

    8.3 Pointer Operators 281

    8.4 Pass-by-Reference with Pointers 283

    8.5 Built-In Arrays 287

    8.6 Using const with Pointers 289

    8.7 sizeof Operator 292

    8.8 Pointer Expressions and Pointer Arithmetic 294

    8.9 Relationship Between Pointers and Built-In Arrays 296

    8.10 Pointer-Based Strings 299

    8.11 Wrap-Up 301

    Chapter 9 Classes: A Deeper Look; Throwing Exceptions 316

    9.1 Introduction 317

    9.2 Time Class Case Study 317

    9.3 Class Scope and Accessing Class Members 323

    9.4 Access Functions and Utility Functions 324

    9.5 Time Class Case Study: Constructors with Default Arguments 324

    9.6 Destructors 328

    9.7 When Constructors and Destructors Are Called 329

    9.8 Time Class Case Study: A Subtle Trap― Returning a Reference or a Pointer to a private

    Data Member 331

    9.9 Default Memberwise Assignment 334

    9.10 const Objects and const Member Functions 335

    9.11 Composition: Objects as Members of Classes 337

    9.12 friend Functions and friend Classes 341

    9.13 Using the this Pointer 343

    9.14 static Class Members 347

    9.15 Wrap-Up 351

    Chapter 10 Operator Overloading; Class string 361

    10.1 Introduction 362

    10.2 Using the Overloaded Operators of Standard Library Class string 362

    10.3 Fundamentals of Operator Overloading 365

    10.4 Overloading Binary Operators 366

    10.5 Overloading the Binary Stream Insertion and Stream Extraction Operators 367

    10.6 Overloading Unary Operators 370

    10.7 Overloading the Unary Prefix and Postfix ++ and -- Operators 370

    10.8 Case Study: A Date Class 371

    10.9 Dynamic Memory Management 375

    10.10 Case Study: Array Class 377

    10.11 Operators as Member vs. Non-Member Functions 387

    10.12 Converting Between Types 388

    10.13 explicit Constructors and Conversion Operators 389

    10.14 Overloading the Function Call Operator () 391

    10.15 Wrap-Up 392

    Chapter 11 Object-Oriented Programming: Inheritance 402

    11.1 Introduction 402

    11.2 Base Classes and Derived Classes 403

    11.3 Relationship between Base and Derived Classes 405

    11.4 Constructors and Destructors in Derived Classes 422

    11.5 public, protected and private Inheritance 424

    11.6 Software Engineering with Inheritance 425

    11.7 Wrap-Up 425

    Chapter 12 Object-Oriented Programming: Polymorphism 431

    12.1 Introduction 432

    12.2 Introduction to Polymorphism: Polymorphic Video Game 432

    12.3 Relationships Among Objects in an Inheritance Hierarchy 433

    12.4 Type Fields and switch Statements 443

    12.5 Abstract Classes and Pure virtual Functions 444

    12.6 Case Study: Payroll System Using Polymorphism 445

    12.7 (Optional) Polymorphism, Virtual Functions and Dynamic Binding “Under the Hood” 456

    12.8 Case Study: Payroll System Using Polymorphism and Runtime Type Information with

    Downcasting, dynamic_cast, typeid and type_info 459

    12.9 Wrap-Up 462

    Chapter 13 Stream Input/Output: A Deeper Look 468

    13.1 Introduction 469

    13.2 Streams 469

    13.3 Stream Output 472

    13.4 Stream Input 473

    13.5 Unformatted I/O Using read, write and gcount 476

    13.6 Introduction to Stream Manipulators 477

    13.7 Stream Format States and Stream Manipulators 481

    13.8 Stream Error States 488

    13.9 Tying an Output Stream to an Input Stream 490

    13.10 Wrap-Up 490

    Chapter 14 File Processing 499

    14.1 Introduction 499

    14.2 Files and Streams 500

    14.3 Creating a Sequential File 500

    14.4 Reading Data from a Sequential File 504

    14.5 Updating Sequential Files 508

    14.6 Random-Access Files 508

    14.7 Creating a Random-Access File 509

    14.8 Writing Data Randomly to a Random-Access File 513

    14.9 Reading from a Random-Access File Sequentially 514

    14.10 Case Study: A Transaction-Processing Program 516

    14.11 Object Serialization 521

    14.12 Wrap-Up 521

    Chapter 15 Standard Library Containers and Iterators 530

    15.1 Introduction 531

    15.2 Introduction to Containers 532

    15.3 Introduction to Iterators 535

    15.4 Introduction to Algorithms 538

    15.5 Sequence Containers 539

    15.6 Associative Containers 550

    15.7 Container Adapters 557

    15.8 Class bitset 561

    15.9 Wrap-Up 562

    Chapter 16 Standard Library Algorithms 573

    16.1 Introduction 573

    16.2 Minimum Iterator Requirements 574

    16.3 Algorithms 575

    16.4 Function Objects 600

    16.5 Lambda Expressions 603

    16.6 Standard Library Algorithm Summary 604

    16.7 Wrap-Up 605

    Chapter 17 Exception Handling: A Deeper Look 613

    17.1 Introduction 613

    17.2 Example: Handling an Attempt to Divide by Zero 614

    17.3 Rethrowing an Exception 618

    17.4 Stack Unwinding 620

    17.5 When to Use Exception Handling 621

    17.6 Constructors, Destructors and Exception Handling 622

    17.7 Exceptions and Inheritance 622

    17.8 Processing new Failures 623

    17.9 Class unique_ptr and Dynamic Memory Allocation 625

    17.10 Standard Library Exception Hierarchy 627

    17.11 Wrap-Up 628

    Chapter 18 Introduction to Custom Templates 634

    18.1 Introduction 634

    18.2 Class Templates 635

    18.3 Function Template to Manipulate a Class-Template Specialization Object 638

    18.4 Nontype Parameters 640

    18.5 Default Arguments for Template Type Parameters 640

    18.6 Overloading Function Templates 640

    18.7 Wrap-Up 641

    Chapter 19 Custom Templatized Data Structures 644

    19.1 Introduction 644

    19.2 Self-Referential Classes 645

    19.3 Linked Lists 646

    19.4 Stacks 657

    19.5 Queues 660

    19.6 Trees 663

    19.7 Wrap-Up 669

    Chapter 20 Searching and Sorting 680

    20.1 Introduction 680

    20.2 Searching Algorithms 681

    20.3 Sorting Algorithms 687

    20.4 Wrap-Up 696

    Chapter 21 Class string and String Stream Processing: A Deeper Look 702

    21.1 Introduction 703

    21.2 string Assignment and Concatenation 704

    21.3 Comparing strings 705

    21.4 Substrings 707

    21.5 Swapping strings 708

    21.6 string Characteristics 708

    21.7 Finding Substrings and Characters in a string 710

    21.8 Replacing Characters in a string 711

    21.9 Inserting Characters into a string 713

    21.10 Conversion to Pointer-Based char * Strings 713

    21.11 Iterators 715

    21.12 String Stream Processing 715

    21.13 C++11 Numeric Conversion Functions 718

    21.14 Wrap-Up 719

    Chapter 22 Bits, Characters, C Strings and structs 726

    22.1 Introduction 727

    22.2 Structure Definitions 727

    22.3 typedef 728

    22.4 Example: Card Shuffling and Dealing Simulation 728

    22.5 Bitwise Operators 730

    22.6 Bit Fields 737

    22.7 Character-Handling Library 740

    22.8 C String-Manipulation Functions 744

    22.9 C String-Conversion Functions 749

    22.10 Search Functions of the C String-Handling Library 753

    22.11 Memory Functions of the C String-Handling Library 756

    22.12 Wrap-Up 759

    Chapter 23 Other Topics 773

    23.1 Introduction 773

    23.2 const_cast Operator 774

    23.3 mutable Class Members 775

    23.4 namespaces 776

    23.5 Operator Keywords 779

    23.6 Pointers to Class Members (.* and ->*) 781

    23.7 Multiple Inheritance 782

    23.8 Multiple Inheritance and virtual Base Classes 786

    23.9 Wrap-Up 789

    Appendix A Operator Precedence and Associativity 794

    Appendix B ASCII Character Set 796

    Appendix C Fundamental Types 797

    Appendix D Number Systems 799

    Appendix E Preprocessor 809

    Index 819



    本书的第24章~第26章、附录F~附录K请登录华信教育资源网(www.hxedu.com.cn)下载。

    Chapter 24 C++11: Additional Features

    Chapter 25 ATM Case Study, Part 1: Object-Oriented Design with the UML

    Chapter 26 ATM Case Study, Part 2: Implementing an Object-Oriented Design

    Appendix F C Legacy Code Topics

    Appendix G UML 2: Additional Diagram Types

    Appendix H Using the Visual Studio Debugger

    Appendix I Using the GNU C++ Debugger

    Appendix J Using the Xcode Debugger

    Appendix K Test Driving a C++ Program on Mac OS X
查看详情
12
系列丛书 / 更多
C++大学教程(第九版)(英文版)
计算机图形学(第4版)
Donald Hearn(D·赫恩)、M.Pauline(M.P.巴克)、Warren、R.Carithers(W.R.卡里瑟斯) 著;蔡士杰、杨若瑜 译
C++大学教程(第九版)(英文版)
操作系统――精髓与设计原理(第八版)
陈向群、陈渝 译
C++大学教程(第九版)(英文版)
模式识别(第四版)
[希腊]Sergios、Theodoridis(西格尔斯.西奥多里蒂斯)、Konstantinos、Koutroumbas(康斯坦提诺斯.库特龙巴斯) 著;李晶皎 译
C++大学教程(第九版)(英文版)
密码学原理与实践(第三版)
[加拿大]Douglas R. Stinson 道格拉斯 R. 斯廷森 著;冯登国 译
C++大学教程(第九版)(英文版)
用户界面设计――有效的人机交互策略(第六版)
[美]本·施耐德曼(Ben Shneiderman)、凯瑟琳·普拉圣特(Catherine Plaisant)、马克辛·科恩(Maxine Cohen) 著;郎大鹏 译
C++大学教程(第九版)(英文版)
自动控制原理与设计(第六版)
[美]Gene F.(吉尼 F. 富兰克林)、J.David、Abbas Emami-Naeini 著;李中华 译
C++大学教程(第九版)(英文版)
现代控制系统(第十三版)(英文版)
Dorf(理查德·C. 多尔夫) 著;[美]Richard、C.、Richard、C.、Dorf(理查德·C. 多尔夫) 译
C++大学教程(第九版)(英文版)
密码编码学与网络安全――原理与实践(第七版)
William、Stallings威廉·斯托林斯(美) 著;王后珍 译
C++大学教程(第九版)(英文版)
算法设计技巧与分析
M. H. Alsuwaiyel(M·H·阿苏外耶) 著;吴伟昶 译
C++大学教程(第九版)(英文版)
C语言大学教程(第七版)(英文版)
Deitel(哈维· 戴特尔) 著;[美]Paul、Deitel(保罗· 戴特尔)、Harvey、Paul、Deitel(保罗· 戴特尔) 译
C++大学教程(第九版)(英文版)
计算机网络与因特网(第六版)(英文版)
[美]Douglas E.Comer(道格拉斯·E.科默) 著
C++大学教程(第九版)(英文版)
国外计算机科学教材系列:Java程序设计教程(第七版)(英文版)
[美]John、[美]William Loftus 著;John Lewis 译
相关图书 / 更多
C++大学教程(第九版)(英文版)
C++那些事
程克非,张兴,崔晓通,秦蔚蓉
C++大学教程(第九版)(英文版)
C++编程这样学
胡芳
C++大学教程(第九版)(英文版)
C++程序设计案例教程(线上线下混合版)
杨卫明;李晓虹
C++大学教程(第九版)(英文版)
C++之旅(第3版)
[美]Bjarne Stroustrup(本贾尼 斯特劳斯特鲁普
C++大学教程(第九版)(英文版)
C++面向对象程序设计(第4版)
谭浩强
C++大学教程(第九版)(英文版)
C++高性能编程
(瑞典)比约恩 安德里斯特(Bj.rn Andrist),(瑞典)维克托 塞尔(Viktor Sehr)
C++大学教程(第九版)(英文版)
C++ Core Guidelines解析
杨文波 译;[德]赖纳·格林(Rainer Grimm)著 吴咏炜;何荣华;张云潮
C++大学教程(第九版)(英文版)
C++开发案例精讲
杨国兴 著
C++大学教程(第九版)(英文版)
C++ Concurrency in Action
Anthony Williams
C++大学教程(第九版)(英文版)
C++程序设计基础与实践
牛园园;韩洁琼;李晓芳;吴成宇
C++大学教程(第九版)(英文版)
C++语言设计教程(计算机专业十四五精品教材)
苏菲、王芬、朱腾 编
C++大学教程(第九版)(英文版)
C++程序设计基础教程
丁卫平 程学云 陈文兰 主编;任红建 沈晓红 文万志 副主编
您可能感兴趣 / 更多
C++大学教程(第九版)(英文版)
青铜与竹简的世界:司马迁对历史的征服(海外司马迁与《史记》研究丛书)
Hardy 著;丁波 译;[美]侯格睿(Grant
C++大学教程(第九版)(英文版)
英文原版 苏斯博士20本故事童书全套 A Classic Case of Dr Seuss 廖彩杏推荐
HarperCollins
C++大学教程(第九版)(英文版)
Solitude: In Pursuit of a Singular Life in a Crowded World
Harris;Michael
C++大学教程(第九版)(英文版)
HBR\'s 10 Must Reads for New Managers (with Bonus Article \"How Managers Become Leaders\" by Michael D. Watkins) (HBR\'s 10 Must Reads)
Harvard Business Review Press;Hill;Linda A. Alinda Anne
C++大学教程(第九版)(英文版)
Keith Haring: The Boy Who Just Kept Drawing
Haring;Kay;Neubecker;Robert
C++大学教程(第九版)(英文版)
The Art of John Harris: Beyond the Horizon
Harris;John
C++大学教程(第九版)(英文版)
Performance Modeling and Design of Computer Systems: Queueing Theory in Action
Harchol-Balter;Mor
C++大学教程(第九版)(英文版)
Explore Harvard: The Yard and Beyond
Harvard Public Affairs and Communication;Harvard University;Heaney;Seamus
C++大学教程(第九版)(英文版)
An Introduction to the Theory of Numbers
Hardy;Godfrey H.;Wright;Edward M.;Hardy;G. H
C++大学教程(第九版)(英文版)
Tess of the D\'Urbervilles
Hardy;Thomas;Dolin;Tim;Dolin;Tim;Higonnet;Margaret Randolph;Bickford
C++大学教程(第九版)(英文版)
Chanson Dada: Tristan Tzara Selected Poems
Harwood;Lee;Tzara;Tristin
C++大学教程(第九版)(英文版)
Far from the Madding Crowd
Hardy;Thomas;Cook;Jonathan A