| |
| |
Introduction | |
| |
| |
| |
Types, Variables, and Standard I/O: Lost Fortune | |
| |
| |
Introducing C++ | |
| |
| |
Writing Your First C++ Program | |
| |
| |
Working with the std Namespace | |
| |
| |
Using Arithmetic Operators | |
| |
| |
Declaring and Initializing Variables | |
| |
| |
Performing Arithmetic Operations with Variables | |
| |
| |
Working with Constants | |
| |
| |
Introducing Lost Fortune | |
| |
| |
Summary | |
| |
| |
Questions and Answers | |
| |
| |
Discussion Questions | |
| |
| |
Exercises | |
| |
| |
| |
Truth, Branching, and the Game Loop: Guess My Number | |
| |
| |
Understanding Truth | |
| |
| |
Using the if Statement | |
| |
| |
Using the else Clause | |
| |
| |
Using the switch Statement | |
| |
| |
Using while Loops | |
| |
| |
Using do Loops | |
| |
| |
Using break and continue Statements | |
| |
| |
Using Logical Operators | |
| |
| |
Generating Random Numbers | |
| |
| |
Understanding the Game Loop | |
| |
| |
Introducing Guess My Number | |
| |
| |
Summary | |
| |
| |
Questions and Answers | |
| |
| |
Discussion Questions | |
| |
| |
Exercises | |
| |
| |
| |
For Loops, Strings, and Arrays: Word Jumble | |
| |
| |
Using for Loops | |
| |
| |
Understanding Objects | |
| |
| |
Using string Objects | |
| |
| |
Using Arrays | |
| |
| |
Understanding C-Style Strings | |
| |
| |
Using Multidimensional Arrays | |
| |
| |
Introducing Word Jumble | |
| |
| |
Summary | |
| |
| |
Questions and Answers | |
| |
| |
Discussion Questions | |
| |
| |
Exercises | |
| |
| |
| |
The Standard Template Library: Hangman | |
| |
| |
Introducing the Standard Template Library | |
| |
| |
Using Vectors | |
| |
| |
Using Iterators | |
| |
| |
Using Algorithms | |
| |
| |
Understanding Vector Performance | |
| |
| |
Examining Other STL Containers | |
| |
| |
Planning Your Programs | |
| |
| |
Introducing Hangman | |
| |
| |
Summary | |
| |
| |
Questions and Answers | |
| |
| |
Discussion Questions | |
| |
| |
Exercises | |
| |
| |
| |
Functions: Mad Lib | |
| |
| |
Creating Functions | |
| |
| |
Using Parameters and Return Values | |
| |
| |
Understanding Software Reuse | |
| |
| |
Working with Scopes | |
| |
| |
Using Global Variables | |
| |
| |
Using Global Constants | |
| |
| |
Using Default Arguments | |
| |
| |
Overloading Functions | |
| |
| |
Inlining Functions | |
| |
| |
Introducing the Mad Lib Game | |
| |
| |
Summary | |
| |
| |
Questions and Answers | |
| |
| |
Discussion Questions | |
| |
| |
Exercises | |
| |
| |
| |
References: Tic-Tac-Toe | |
| |
| |
Using References | |
| |
| |
Passing References to Alter Arguments | |
| |
| |
Passing References for Efficiency | |
| |
| |
Deciding How to Pass Arguments | |
| |
| |
Returning References | |
| |
| |
Introducing the Tic-Tac-Toe Game | |
| |
| |
Summary | |
| |
| |
Questions and Answers | |
| |
| |
Discussion Questions | |
| |
| |
Exercises | |
| |
| |
| |
Pointers: Tic-Tac-Toe 2.0 | |
| |
| |
Understanding Pointer Basics | |
| |
| |
Understanding Pointers and Constants | |
| |
| |
Passing Pointers | |
| |
| |
Returning Pointers | |
| |
| |
Understanding the Relationship between Pointers and Arrays | |
| |
| |
Introducing the Tic-Tac-Toe 2.0 Game | |
| |
| |
Summary | |
| |
| |
Questions and Answers | |
| |
| |
Discussion Questions | |
| |
| |
Exercises | |
| |
| |
| |
Classes: Critter Caretaker | |
| |
| |
Defining New Types | |
| |
| |
Using Constructors | |
| |
| |
Setting Member Access Levels | |
| |
| |
Using Static Data Members and Member Functions | |
| |
| |
Introducing the Critter Caretaker Game | |
| |
| |
Summary | |
| |
| |
Questions and Answers | |
| |
| |
Discussion Questions | |
| |
| |
Exercises | |
| |
| |
| |
Advanced Classes and Dynamic Memory: Game Lobby | |
| |
| |
Using Aggregation | |
| |
| |
Using Friend Functions and Operator Overloading | |
| |
| |
Dynamically Allocating Memory | |
| |
| |
Working with Data Members and the Heap | |
| |
| |
Summary | |
| |
| |
Questions and Answers | |
| |
| |
Discussion Questions | |
| |
| |
Exercises | |
| |
| |
| |
Inheritance and Polymorphism: Blackjack | |
| |
| |
Introducing Inheritance | |
| |
| |
Controlling Access under Inheritance | |
| |
| |
Calling and Overriding Base Class Member Functions | |
| |
| |
Using Overloaded Assignment Operators and Copy Constructors in Derived Classes | |
| |
| |
Introducing Polymorphism | |
| |
| |
Using Abstract Classes | |
| |
| |
Organizing Your Code | |
| |
| |
Introducing the Blackjack Game | |
| |
| |
Summary | |
| |
| |
Questions and Answers | |
| |
| |
Discussion Questions | |
| |
| |
Exercises | |
| |
| |
Index | |