1 HOW THIS BOOK TEACHES YOU THE LANGUAGE
why you should learn C++
object-oriented programming languages
procedure-oriented programing languages
programming cliches
2 HOW TO COMPILE AND RUN A SIMPLE PROGRAM
compiling, linking, and executing
statements and declarations
the output operator, <<, and character strings
case sensitivity and blank insensitivity
operators and operands
3 HOW TO DECLARE VARIABLES
data types and variable declarations
initialization and assignment
integral data types
4 HOW TO WRITE ARrFHMETIC EXPRESSIONS
arithmetic
precedence and association
binary and unary operators
type casting
5 HOW TO WRITE STATEMENTS THAT READ INFORMATION FROM YOUR KEYBOARD
the input operator, >>
input redirection
6 HOW TO DEFINE SIMPLE FUNCTIONS
calling and returning from functions
arguments, parameters, and values
function overloading
7 HOW TO BENEFIT FROM PROCEDURE ABSTRACTION
making programs easier to reuse, read, and debug
making programs easier to augment, improve, and adapt
8 HOW TO WORK WITH LOCAL AND GLOBAL VARIABLES
extent and scope
local, static, and global variables
compound statements
9 HOW TO CREATE CLASSES AND OBJECTS
user-defined data types, classes, and objects
class specification and member variables
the class-member operator
10 HOW TO DEHNE MEMBER FUNCTIONS
the special, class-object argument
member function prototypes
the class-scope operator, : :
11 HOW TO DEFINE CONSTRUCTOR MEMBER FUNCTIONS
the default constructor
argument-bearing constructors
12 HOW TO DEFHNE READER AND WRITER MEMBER FUNCTIONS
reader and writer member functions
imaginary member variables
13 HOW TO BFaNEF1T FROM DATA ABSTRACTION
access functions and data abstraction
making programs easier to reuse
14 HOW TO PROTECT MEMBER VARIABLES FROM HARMFUL REFERENCE
private member variables and member functions
the public interface
15 HOW TO DEFINE CLASSES THAT INHERIT VARIABLES AND FUNCTIONS
inheriting member variables and member functions
derived classes and base classes
multiple inheritance and shadowing
16 HOW TO DESIGN CLASSES AND CLASS HIERARCHIES
explicit representation
reusing functions and avoiding duplication
the local-view and the look-it-up principles
the need-m-know and the keep-it-simple principles
17 HOW TO PERFORM TESTS USING NUMERICAL PREDICATES
equal, ==, and not equal, !--
greater than, >, and less than, <
not, !
18 HOW TO WRITE ONF.-WAY AND TWO-WAY CONDITONAL STATEMENTS
Boolean expressions
if and if else
empty and compound statements
the conditional operator, ?:
19 HOW TO COMBINE BOOLEAN EXPRESSIONS
and, &&, and or, ::
evaluation order
20 HOW TO WRITE ITERATION STATEMENTS
while and for statements
augmented assignment operators
increment, ++, and decrement, --, operators
side effects and evaluation order
21 HOW TO PROCESS DATA IN FILES
while reading and for reading loops
action of the input operator at the end of a file
22 HOW TO WRITE RECURSIVE FUNCTIONS
functions that call themselves
the base part and the recursion part
efficiency considerations
23 HOW TO SOLVE DEFINITION ORDERING PROBLEMS WITH FUNCTION PROTOTYPES
the definition-before-call requirement
declare now, define later
24 HOW TO WORK WITH ARRAYS OF NUMBERS
arrays of numeric elements
filling a numeric array from a file
25 HOW TO WORK WITH ARRAYS OF CLASS OBJECTS
arrays of class-object elements
filling an object array from a file
26 HOW TO CREATE FILE STREAMS FOR INPUT AND OUTPUT
creating streams
opening and closing files for reading and writing
Ifstream and of stream Statements
27 HOW TO CREATE NEW CLASS OBIECTS AT RUN TIME
pointers and the free store
allocating space with new
the dereferencing operator, *
the class-pointer operator, ->
the address-of operator, &
28 HOW TO STORE POintERS TO CLASS OBJECTS
wasting space by defining too-large object arrays
saving space by defining too-large pointer arrays
29 HOW TO WRITE PROGRAMS THAT FIND
MEMBER FUNCTIONS AT RUN TIME
arrays of pointers to miscellaneous obiects
virtual member functions
pure virtual functions
30 HOW TO WRITE MULTIWAY CONDTIONAL STATEMENTS
switch statements
the cerr output stream
exit statements
31 HOW TO USE ENUMERATONS TO IMPROVE READABILITY
the mnemonic sterility of numbers
the enumeration data type
the integral data types
the character data type
32 HOW TO WRITE CONSTRUCTORS THAT CALL OTHER CONSTRUCTORS
33 HOW TO WRITE MEMBER FUNCTIONS THAT CALL OTHER MEMBER FUNCTIONS
34 HOW TO USE PROTECTED AND PRIVATE VARIABLES AND FUNCTIONS
35 HOW TO USE PROTECTED AND PRIVATE CLASS DERIVATIONS
36 HOW TO WRITE FUNCTIONS THAT RETURN CHARACIXR STRINGS
character strings and character arrays
the null character, \O
37 HOW TO USE CALL-BY-REFERENCE PARAMETERS
call by value and incomplete argument copy/ng
using call by reference to access entire objects
using call by reference to save time
using call by reference to alter arguments
38 HOW TO OVERLOAD THE OUTPUT OPERATOR
copy-free function return
pass-through objects
operator overloading
39 HOW TO PRODUCE TABULAR DISPLAYS
the peintf function
field widths and padding characters
printing strings, characters, and numbers
40 HOW TO WroTE STATEMEUTS THAT READ CHARACTER STRINGS FROM HLES
input buffers
using the input operator with a character pointer
array names viewed as constant pointers
41 HOW TO TEST STRING CHARACTERS
characters viewed as integers
obtaining character codes
using enumeration constants as character codes
42 HOW TO DEPOSIT CHARACTER STRINGS INTO CLASS OBJECTS
creating character arrays at run time using new
using strlen and strcpy to measure and copy
43 HOW TO RECLAIM MEMORY WITH DELETE AND DESTRUCTORS
garbage and memory leaks
delete viewed as the complement of new
destructor member functions
stadic member variables
44 HOW TO PREVENT OBJECT COPYING
the excess-reclamation bug
defining your own copy constructor
45 HOW TO ORGANIZE A MULTIPLE-FILE PROGRAM
header files
separating class and member-function definitious
inline functions
managing global variables with static and extern
46 HOW TO COMPILE A MULTIPLE-FILE PROGRAM
recording file dependencies in a makefile
maintaining systems using the make utility
47 HOW TO IMPLEMENT LISTS
using lists to conserve memory
internal and external pointers
the null pointer, NULL
48 HOW TO MAKE ONE CLASS A FRIEND OF ANOTHER CLASS
49 HOW TO REUSE CLASS DEFINITIONS US/NG TEMPLATES
50 HOW TO ITERATE OVER LISTS USING ITERATION CLASS OBJECTS
APPENDIX A: OPERATOR PRECEDENCE
APPENDIX B: FORMATTED DISPLAY
COLOPHON
INDEX