digg.png delicious.png blinkit.png furl.png
C++ How to Program, Third Edition Table of Contents (Continued)
5 Pointers and Strings 304

5.1 Introduction 305
5.2 Pointer Variable Declarations and Initialization 306
5.3 Pointer Operators 307
5.4 Calling Functions by Reference 310
5.5 Using the const Qualifier with Pointers 314
5.6 Bubble Sort Using Call-by-reference 321
5.7 Pointer Expressions and Pointer Arithmetic 326
5.8 The Relationship Between Pointers and Arrays 328
5.9 Arrays of Pointers 333
5.10 Case Study: A Card Shuffling and Dealing Simulation 333
5.11 Function Pointers 338
5.12 Introduction to Character and String Processing 343
5.12.1 Fundamentals of Characters and Strings 343
5.12.2 String Manipulation Functions of the String-handling Library 345
5.13 [Optional Case Study] Thinking About Objects: Collaborations Among Objects 353

6 Classes and Data Abstraction 389

6.1 Introduction 390
6.2 Structure Definitions 391
6.3 Accessing Members of Structures 392
6.4 Implementing a User-Defined Type Time with a struct 393
6.5 Implementing a Time Abstract Data Type with a class 395
6.6 Class Scope and Accessing Class Members 402
6.7 Separating Interface from Implementation 404
6.8 Controlling Access to Members 407
6.9 Access Functions and Utility Functions 410
6.10 Initializing Class Objects: Constructors 413
6.11 Using Default Arguments with Constructors 414
6.12 Using Destructors 418
6.13 When Constructors and Destructors Are Called 418
6.14 Using Data Members and Member Functions 421
6.15 A Subtle Trap: Returning a Reference to a Private Data Member 426
6.16 Assignment by Default Memberwise Copy 429
6.17 Software Reusability 430
6.18 [Optional Case Study) Thinking About Objects: Starting to Program the Classes for the Elevator Simulator 431

7 Classes: Part II 452

7.1 Introduction 453
7.2 const (Constant) Objects and const Member Functions 453
7.3 Composition: Objects as Members of Classes 462
7.4 friend Functions and friend Classes 467
7.5 Using the this Pointer 471
7.6 Dynamic Memory Allocation with Operators new and delete 476
7.7 static Class Members 477
7.8 Data Abstraction and Information Hiding 483
7.8.1 Example: Array Abstract Data Type 484
7.8.2 Example: String Abstract Data Type 485
7.8.3 Example: Queue Abstract Data Type 485
7.9 Container Classes and Iterators 486
7.10 Proxy Classes 486
7.10 [Optional Case Study] Thinking About Objects: Programming the Classes for the Elevator Simulator 488

8 Operator Overloading 523

8.1 Introduction 524
8.2 Fundamentals of Operator Overloading 525
8.3 Restrictions on Operator Overloading 526
8.4 Operator Functions as Class Members vs. as friend Functions 528
8.5 Overloading Stream-Insertion and Stream-Extraction Operators 529
8.6 Overloading Unary Operators 532
8.7 Overloading Binary Operators 532
8.8 Case Study: An Array Class 533
8.9 Converting between Types 545
8.10 Case Study: A String Class 546
8.11 Overloading ++ and -- 558
8.12 Case Study: A Date Class 559

Page 1 | 2 | 3 | 4 | 5 | 6