C++ How to Program By H. M. Deitel - Deitel & Associates, Inc. P. J. Deitel - Deitel & Associates, Inc.

Chapter 1. Introduction to Computers, the Internet and World Wide Web :
Section 1.1. Introduction
Section 1.2. What Is a Computer?
Section 1.3. Computer Organization
Section 1.4. Early Operating Systems
Section 1.5. Personal, Distributed and Client/Server Computing
Section 1.6. The Internet and the World Wide Web
Section 1.7. Machine Languages, Assembly Languages and High-Level Languages
Section 1.8. History of C and C++
Section 1.9. C++ Standard Library
Section 1.10. History of Java
Section 1.11. FORTRAN, COBOL, Pascal and Ada
Section 1.12. Basic, Visual Basic, Visual C++, C# and .NET
Section 1.13. Key Software Trend: Object Technology
Section 1.14. Typical C++ Development Environment
Section 1.15. Notes About C++ and C++ How to Program, 5/e
Section 1.16. Test-Driving a C++ Application
Section 1.17. Software Engineering Case Study: Introduction to Object Technology and the UML (Required)
Section 1.18. Wrap-Up
Section 1.19. Web Resources

Chapter 2. Introduction to C++ Programming :
Section 2.1. Introduction
Section 2.2. First Program in C++: Printing a Line of Text
Section 2.3. Modifying Our First C++ Program
Section 2.4. Another C++ Program: Adding Integers
Section 2.5. Memory Concepts
Section 2.6. Arithmetic
Section 2.7. Decision Making: Equality and Relational Operators
Section 2.8. (Optional) Software Engineering Case Study: Examining the ATM Requirements Document
Section 2.9. Wrap-Up

Chapter 3. Introduction to Classes and Objects :
Section 3.1. Introduction
Section 3.2. Classes, Objects, Member Functions and Data Members
Section 3.3. Overview of the Chapter Examples
Section 3.4. Defining a Class with a Member Function
Section 3.5. Defining a Member Function with a Parameter
Section 3.6. Data Members, set Functions and get Functions
Section 3.7. Initializing Objects with Constructors
Section 3.8. Placing a Class in a Separate File for Reusability
Section 3.9. Separating Interface from Implementation
Section 3.10. Validating Data with set Functions
Section 3.11. (Optional) Software Engineering Case Study: Identifying the Classes in the ATM Requirements Document
Section 3.12. Wrap-Up

Chapter 4. Control Statements: Part 1
Section 4.1. Introduction
Section 4.2. Algorithms
Section 4.3. Pseudocode
Section 4.4. Control Structures
Section 4.5. if Selection Statement
Section 4.6. if...else Double-Selection Statement
Section 4.7. while Repetition Statement
Section 4.8. Formulating Algorithms: Counter-Controlled Repetition
Section 4.9. Formulating Algorithms: Sentinel-Controlled Repetition
Section 4.10. Formulating Algorithms: Nested Control Statements
Section 4.11. Assignment Operators
Section 4.12. Increment and Decrement Operators
Section 4.13. (Optional) Software Engineering Case Study: Identifying Class Attributes in the ATM System
Section 4.14. Wrap-Up

Chapter 5. Control Statements: Part 2
Section 5.1. Introduction
Section 5.2. Essentials of Counter-Controlled Repetition
Section 5.3. for Repetition Statement
Section 5.4. Examples Using the for Statement
Section 5.5. do...while Repetition Statement
Section 5.6. switch Multiple-Selection Statement
Section 5.7. break and continue Statements
Section 5.8. Logical Operators
Section 5.9. Confusing Equality (==) and Assignment (=) Operators
Section 5.10. Structured Programming Summary 217 Section 5.11. (Optional) Software Engineering Case Study: Identifying Objects' States and Activities in the ATM System
Section 5.12. Wrap-Up

Chapter 6. Functions and an Introduction to Recursion:
Section 6.1. Introduction
Section 6.2. Program Components in C++
Section 6.3. Math Library Functions
Section 6.4. Function Definitions with Multiple Parameters
Section 6.5. Function Prototypes and Argument Coercion
Section 6.6. C++ Standard Library Header Files
Section 6.7. Case Study: Random Number Generation
Section 6.8. Case Study: Game of Chance and Introducing enum
Section 6.9. Storage Classes
Section 6.10. Scope Rules
Section 6.11. Function Call Stack and Activation Records
Section 6.12. Functions with Empty Parameter Lists
Section 6.13. Inline Functions
Section 6.14. References and Reference Parameters
Section 6.15. Default Arguments
Section 6.16. Unary Scope Resolution Operator
Section 6.17. Function Overloading
Section 6.18. Function Templates
Section 6.19. Recursion
Section 6.20. Example Using Recursion: Fibonacci Series
Section 6.21. Recursion vs. Iteration
Section 6.22. (Optional) Software Engineering Case Study: Identifying Class Operations in the ATM System
Section 6.23. Wrap-Up

Chapter 7. Arrays and Vectors :
Section 7.1. Introduction
Section 7.2. Arrays
Section 7.3. Declaring Arrays
Section 7.4. Examples Using Arrays
Section 7.5. Passing Arrays to Functions
Section 7.6. Case Study: Class GradeBook Using an Array to Store Grades
Section 7.7. Searching Arrays with Linear Search
Section 7.8. Sorting Arrays with Insertion Sort
Section 7.9. Multidimensional Arrays
Section 7.10. Case Study: Class GradeBook Using a Two-Dimensional Array
Section 7.11. Introduction to C++ Standard Library Class Template vector
Section 7.12. (Optional) Software Engineering Case Study: Collaboration Among Objects in the ATM System
Section 7.13. Wrap-Up

Chapter 8. Pointers and Pointer-Based Strings:
Section 8.1. Introduction
Section 8.2. Pointer Variable Declarations and Initialization
Section 8.3. Pointer Operators
Section 8.4. Passing Arguments to Functions by Reference with Pointers
Section 8.5. Using const with Pointers
Section 8.6. Selection Sort Using Pass-by-Reference
Section 8.7. sizeof Operators
Section 8.8. Pointer Expressions and Pointer Arithmetic
Section 8.9. Relationship Between Pointers and Arrays
Section 8.10. Arrays of Pointers
Section 8.11. Case Study: Card Shuffling and Dealing Simulation
Section 8.12. Function Pointers
Section 8.13. Introduction to Pointer-Based String Processing
Section 8.14. Wrap-Up

Chapter 9. Classes: A Deeper Look, Part 1
Section 9.1. Introduction
Section 9.2. Time Class Case Study
Section 9.3. Class Scope and Accessing Class Members
Section 9.4. Separating Interface from Implementation
Section 9.5. Access Functions and Utility Functions
Section 9.6. Time Class Case Study: Constructors with Default Arguments
Section 9.7. Destructors
Section 9.8. When Constructors and Destructors Are Called
Section 9.9. Time Class Case Study: A Subtle TrapReturning a Reference to a private Data Member
Section 9.10. Default Memberwise Assignment
Section 9.11. Software Reusability
Section 9.12. (Optional) Software Engineering Case Study: Starting to Program the Classes of the ATM System
Section 9.13. Wrap-Up

Chapter 10. Classes: A Deeper Look, Part 2
Section 10.1. Introduction
Section 10.2. const (Constant) Objects and const Member Functions
Section 10.3. Composition: Objects as Members of Classes
Section 10.4. friend Functions and friend Classes
Section 10.5. Using the this Pointer
Section 10.6. Dynamic Memory Management with Operators new and delete
Section 10.7. static Class Members
Section 10.8. Data Abstraction and Information Hiding
Section 10.9. Container Classes and Iterators
Section 10.10. Proxy Classes
Section 10.11. Wrap-Up

Chapter 11. Operator Overloading; String and Array Objects
Section 11.1. Introduction
Section 11.2. Fundamentals of Operator Overloading
Section 11.3. Restrictions on Operator Overloading
Section 11.4. Operator Functions as Class Members vs. Global Functions
Section 11.5. Overloading Stream Insertion and Stream Extraction Operators
Section 11.6. Overloading Unary Operators
Section 11.7. Overloading Binary Operators
Section 11.8. Case Study: Array Class
Section 11.9. Converting between Types
Section 11.10. Case Study: String Class
Section 11.11. Overloading ++ and --
Section 11.12. Case Study: A Date Class
Section 11.13. Standard Library Class string
Section 11.14. explicit Constructors
Section 11.15. Wrap-Up

Chapter 12. Object-Oriented Programming: Inheritance
Section 12.1. Introduction
Section 12.2. Base Classes and Derived Classes
Section 12.3. protected Members
Section 12.4. Relationship between Base Classes and Derived Classes
Section 12.5. Constructors and Destructors in Derived Classes
Section 12.6. public, protected and private Inheritance
Section 12.7. Software Engineering with Inheritance
Section 12.8. Wrap-Up

Chapter 13. Object-Oriented Programming: Polymorphism
Section 13.1. Introduction
Section 13.2. Polymorphism Examples
Section 13.3. Relationships Among Objects in an Inheritance Hierarchy
Section 13.4. Type Fields and switch Statements
Section 13.5. Abstract Classes and Pure virtual Functions
Section 13.6. Case Study: Payroll System Using Polymorphism
Section 13.7. (Optional) Polymorphism, Virtual Functions and Dynamic Binding "Under the Hood"
Section 13.8. Case Study: Payroll System Using Polymorphism and Run-Time Type Information with Downcasting, dynamic_cast, typeid and type_info
Section 13.9. Virtual Destructors
Section 13.10. (Optional) Software Engineering Case Study: Incorporating Inheritance into the ATM System
Section 13.11. Wrap-Up

Chapter 14. Templates:
Section 14.1. Introduction
Section 14.2. Function Templates
Section 14.3. Overloading Function Templates
Section 14.4. Class Templates
Section 14.5. Nontype Parameters and Default Types for Class Templates
Section 14.6. Notes on Templates and Inheritance
Section 14.7. Notes on Templates and Friends
Section 14.8. Notes on Templates and static Members
Section 14.9. Wrap-Up

Chapter 15. Stream Input/Output:
Section 15.1. Introduction
Section 15.2. Streams
Section 15.3. Stream Output
Section 15.4. Stream Input
Section 15.5. Unformatted I/O using read, write and gcount
Section 15.6. Introduction to Stream Manipulators
Section 15.7. Stream Format States and Stream Manipulators
Section 15.8. Stream Error States
Section 15.9. Tying an Output Stream to an Input Stream
Section 15.10. Wrap-Up

Chapter 16. Exception Handling :
Section 16.1. Introduction
Section 16.2. Exception-Handling Overview
Section 16.3. Example: Handling an Attempt to Divide by Zero
Section 16.4. When to Use Exception Handling
Section 16.5. Rethrowing an Exception
Section 16.6. Exception Specifications
Section 16.7. Processing Unexpected Exceptions
Section 16.8. Stack Unwinding
Section 16.9. Constructors, Destructors and Exception Handling
Section 16.10. Exceptions and Inheritance
Section 16.11. Processing new Failures
Section 16.12. Class auto_ptr and Dynamic Memory Allocation
Section 16.13. Standard Library Exception Hierarchy
Section 16.14. Other Error-Handling Techniques
Section 16.15. Wrap-Up

Chapter 17. File Processing:
Section 17.1. Introduction
Section 17.2. The Data Hierarchy
Section 17.3. Files and Streams
Section 17.4. Creating a Sequential File
Section 17.5. Reading Data from a Sequential File
Section 17.6. Updating Sequential Files
Section 17.7. Random-Access Files
Section 17.8. Creating a Random-Access File
Section 17.9. Writing Data Randomly to a Random-Access File
Section 17.10. Reading from a Random-Access File Sequentially
Section 17.11. Case Study: A Transaction-Processing Program
Section 17.12. Input/Output of Objects
Section 17.13. Wrap-Up

Chapter 18. Class string and String Stream Processing:
Section 18.1. Introduction
Section 18.2. string Assignment and Concatenation
Section 18.3. Comparing strings
Section 18.4. Substrings
Section 18.5. Swapping strings
Section 18.6. string Characteristics
Section 18.7. Finding Strings and Characters in a string
Section 18.8. Replacing Characters in a string
Section 18.9. Inserting Characters into a string
Section 18.10. Conversion to C-Style Pointer-Based char * Strings
Section 18.11. Iterators
Section 18.12. String Stream Processing
Section 18.13. Wrap-Up

S Chapter 19. Web Programming:
Section 19.1. Introduction
Section 19.2. HTTP Request Types
Section 19.3. Multitier Architecture
Section 19.4. Accessing Web Servers
Section 19.5. Apache HTTP Server
Section 19.6. Requesting XHTML Documents
Section 19.7. Introduction to CGI
Section 19.8. Simple HTTP Transactions
Section 19.9. Simple CGI Scripts
Section 19.10. Sending Input to a CGI Script
Section 19.11. Using XHTML Forms to Send Input
Section 19.12. Other Headers
Section 19.13. Case Study: An Interactive Web Page
Section 19.14. Cookies
Section 19.15. Server-Side Files
Section 19.16. Case Study: Shopping Cart
Section 19.17. Wrap-Up 969 Section 19.18. Internet and Web Resources

Chapter 20. Searching and Sorting:
Section 20.1. Introduction
Section 20.2. Searching Algorithms
Section 20.3. Sorting Algorithms
Section 20.4. Wrap-Up

Chapter 21. Data Structures:
Section 21.1. Introduction
Section 21.2. Self-Referential Classes
Section 21.3. Dynamic Memory Allocation and Data Structures
Section 21.4. Linked Lists
Section 21.5. Stacks
Section 21.6. Queues
Section 21.7. Trees
Section 21.8. Wrap-Up

Chapter 22. Bits, Characters, C-Strings and structs:
Section 22.1. Introduction
Section 22.2. Structure Definitions
Section 22.3. Initializing Structures
Section 22.4. Using Structures with Functions
Section 22.5. typedef
Section 22.6. Example: High-Performance Card Shuffling and Dealing Simulation
Section 22.7. Bitwise Operators
Section 22.8. Bit Fields
Section 22.9. Character-Handling Library
Section 22.10. Pointer-Based String-Conversion Functions
Section 22.11. Search Functions of the Pointer-Based String-Handling Library
Section 22.12. Memory Functions of the Pointer-Based String-Handling Library
Section 22.13. Wrap-Up

Chapter 23. Standard Template Library (STL):
Section 23.1. Introduction to the Standard Template Library (STL)
Section 23.2. Sequence Containers
Section 23.3. Associative Containers
Section 23.4. Container Adapters
Section 23.5. Algorithms
Section 23.6. Class bitset
Section 23.7. Function Objects
Section 23.8. Wrap-Up
Section 23.9. STL Internet and Web Resources

Chapter 24. Other Topics:
Section 24.1. Introduction
Section 24.2. const_cast Operator
Section 24.3. namespaces
Section 24.4. Operator Keywords
Section 24.5. mutable Class Members
Section 24.6. Pointers to Class Members (.* and ->*)
Section 24.7. Multiple Inheritance
Section 24.8. Multiple Inheritance and virtual Base Classes
Section 24.9. Wrap-Up
Section 24.10. Closing Remarks .Download