| |
| |
Preface | |
| |
| |
| |
Getting started | |
| |
| |
| |
Comments | |
| |
| |
| |
#include | |
| |
| |
| |
The main function | |
| |
| |
| |
Curly braces | |
| |
| |
| |
Using the standard library for output | |
| |
| |
| |
The return statement | |
| |
| |
| |
A slightly deeper look | |
| |
| |
| |
Details | |
| |
| |
| |
Working with strings | |
| |
| |
| |
Input | |
| |
| |
| |
Framing a name | |
| |
| |
| |
Details | |
| |
| |
| |
Looping and counting | |
| |
| |
| |
The problem | |
| |
| |
| |
Overall structure | |
| |
| |
| |
Writing an unknown number of rows | |
| |
| |
| |
Writing a row | |
| |
| |
| |
The complete framing program | |
| |
| |
| |
Counting | |
| |
| |
| |
Details | |
| |
| |
| |
Working with batches of data | |
| |
| |
| |
Computing student grades | |
| |
| |
| |
Using medians instead of averages | |
| |
| |
| |
Details | |
| |
| |
| |
Organizing programs and data | |
| |
| |
| |
Organizing computations | |
| |
| |
| |
Organizing data | |
| |
| |
| |
Putting it all together | |
| |
| |
| |
Partitioning the grading program | |
| |
| |
| |
The revised grading program | |
| |
| |
| |
Details | |
| |
| |
| |
Using sequential containers and analyzing strings | |
| |
| |
| |
Separating students into categories | |
| |
| |
| |
Iterators | |
| |
| |
| |
Using iterators instead of indices | |
| |
| |
| |
Rethinking our data structure for better performance | |
| |
| |
| |
The list type | |
| |
| |
| |
Taking strings apart | |
| |
| |
| |
Testing our split function | |
| |
| |
| |
Putting strings together | |
| |
| |
| |
Details | |
| |
| |
| |
Using library algorithms | |
| |
| |
| |
Analyzing strings | |
| |
| |
| |
Comparing grading schemes | |
| |
| |
| |
Classifying students, revisited | |
| |
| |
| |
Algorithms, containers, and iterators | |
| |
| |
| |
Details | |
| |
| |
| |
Using associative containers | |
| |
| |
| |
Containers that support efficient look-up | |
| |
| |
| |
Counting words | |
| |
| |
| |
Generating a cross-reference table | |
| |
| |
| |
Generating sentences | |
| |
| |
| |
A note on performance | |
| |
| |
| |
Details | |
| |
| |
| |
Writing generic functions | |
| |
| |
| |
What is a generic function? | |
| |
| |
| |
Data-structure independence | |
| |
| |
| |
Input and output iterators | |
| |
| |
| |
Using iterators for flexibility | |
| |
| |
| |
Details | |
| |
| |
| |
Defining new types | |
| |
| |
| |
Student_info revisited | |
| |
| |
| |
Class types | |
| |
| |
| |
Protection | |
| |
| |
| |
The Student_info class | |
| |
| |
| |
Constructors | |
| |
| |
| |
Using the Student_info class | |
| |
| |
| |
Details | |
| |
| |
| |
Managing memory and low-level data structures | |
| |
| |
| |
Pointers and arrays | |
| |
| |
| |
String literals revisited | |
| |
| |
| |
Initializing arrays of character pointers | |
| |
| |
| |
Arguments to main | |
| |
| |
| |
Reading and writing files | |
| |
| |
| |
Three kinds of memory management | |
| |
| |
| |
Details | |
| |
| |
| |
Defining abstract data types | |
| |
| |
| |
The Vec class | |
| |
| |
| |
Implementing the Vec class | |
| |
| |
| |
Copy control | |
| |
| |
| |
Dynamic Vecs | |
| |
| |
| |
Flexible memory management | |
| |
| |
| |
Details | |
| |
| |
| |
Making class objects act like values | |
| |
| |
| |
A simple string class | |
| |
| |
| |
Automatic conversions | |
| |
| |
| |
Str operations | |
| |
| |
| |
Some conversions are hazardous | |
| |
| |
| |
Conversion operators | |
| |
| |
| |
Conversions and memory management | |
| |
| |
| |
Details | |
| |
| |
| |
Using inheritance and dynamic binding | |
| |
| |
| |
Inheritance | |
| |
| |
| |
Polymorphism and virtual functions | |
| |
| |
| |
Using inheritance to solve our problem | |
| |
| |
| |
A simple handle class | |
| |
| |
| |
Using the handle class | |
| |
| |
| |
Subtleties | |
| |
| |
| |
Details | |
| |
| |
| |
Managing memory (almost) automatically | |
| |
| |
| |
Handles that copy their objects | |
| |
| |
| |
Reference-counted handles | |
| |
| |
| |
Handles that let you decide when to share data | |
| |
| |
| |
An improvement on controllable handles | |
| |
| |
| |
Details | |
| |
| |
| |
Revisiting character pictures | |
| |
| |
| |
Design | |
| |
| |
| |
Implementation | |
| |
| |
| |
Details | |
| |
| |
| |
Where do we go from here? | |
| |
| |
| |
Use the abstractions you have | |
| |
| |
| |
Learn more | |
| |
| |
| |
Language details | |
| |
| |
| |
Declarations | |
| |
| |
| |
Types | |
| |
| |
| |
Expressions | |
| |
| |
| |
Statements | |
| |
| |
| |
Library summary | |
| |
| |
| |
Input-output | |
| |
| |
| |
Containers and iterators | |
| |
| |
| |
Algorithms | |
| |
| |
Index | |