Index
#define preprocessor directive
856
#endif preprocessor directive
856, 863
as "address of" operator
619
as marker for reference argument
350
<cstring> header file
411
<fstream> header file
346
<iomanip> header file
631
<string.h> header file
411
16 bit register names on a 32 bit machine
50
why member variables should be
340, 397
why member variables should not be
341
repeating in class declaration
604
algebraic equality vs. assignment statement
75
name translated to address
495
used in homegrown string class
543
increment instruction
172
statement vs. algebraic equality
75
See also class, base class, derived class, polymorphic object
backspace key, editing with
945
base 16 numbering system
42
base 8 numbering system
41
deleting a derived class object through
679
pointing to a derived class object
643, 699
binary number system
32-37
address of char data for standard string
884
of identifiers and keywords
69
facilities not provided by standard
917, 948
header file preprocessor symbol convention
865
keywords and symbols, reusing
297, 444
operator precedence in
992
standard, official name of
232
string position numbering convention in
882
and one-based indexing
167
use of for variable length data
421
special for program text
109
as a user-defined type
302
first example definition
305
interface and implementation files
303
leaving out name inside declaration
322
scope of member variables
327, 329
size of objects determined
321
static member variable
327
types supported like native types
448
code duplication, reducing
820
comparing two streams
804
checking types of variables
107
memory leak reporting
457
vs. native type facilities
311
compiling the compiler
72
compiler-generated functions
375
assignment not allowed to
324
defining a const value
541, 542
use with reference arguments
444
See also class, base class, derived class, polymorphic object
See also class, base class, derived class, polymorphic object
user-defined types and
533
creating programmatically
797
See also class, base class, derived class, polymorphic object
defensive programming
737
location of definition
604
See also class, base class, polymorphic object
implementation for homegrown string class
463-465
normally called automatically
464
unique for a given class
739
why we need in a base class
679
See also class, base class, derived class, polymorphic object
dynamic memory allocation
417
error prone nature of
456
EBCDIC character code
106
echoing data to the screen
943
empty C string literal ""
325
automatic conversion to integer type
828
why we should not do arithmetic on
831
executing code before the beginning of main
744
floating-point flaw, Pentium
69
continuation expression
171, 208
modification expression
171, 208
formatting of the display
954
See also class, base class, derived class, polymorphic object
machine language call instruction
261, 266
machine language return instruction
266
returning more than one value
931
calling most recently defined version of
851
calling through a base class pointer
665
English description of mechanism
673
valid object required to call
717
why user-defined only
428
using to select a special constructor
721
garbage in, garbage out
203
home inventory program
753-989
analyzing the final version
913-983
homegrown string class
405-561
C string literals vs.
406
containing a null byte
518
reading from an istream
540
See home inventory program
See home inventory program
implementation file
73, 220
implementation module
221
incremental development
897-905
incrementing a variable
172
virtual functions and
658
See also class, base class, polymorphic object
initialization vs. assignment
542
how negative values are stored
37
using with class types
339
least recently used (LRU)
28
machine instruction
49, 57
memory manipulation functions
memory protection facilities
251
memory-to-memory instructions
52
affected by a change in a header
249
multicharacter constant
138
multiplication symbol "*"
34
used as string terminator
545
non-const array size not allowed
544
See also class, base class, derived class, polymorphic object
object member access operator
object-oriented design
589, 878
object-oriented programming
302, 393
.primary organizing principles
341
operating system facilities
250
514, 519, 533, 534, 535, 536, 540, 549, 549, 550, 685
as class membership operator
309, 322
as scope resolution operator
273
as assignment operator
75
declaring for homegrown string class
447
hypothetical version with explicit this
462
implementation for homegrown string class
438-462
reference argument to
506
user-defined for homegrown string class
441
why it needs a reference argument
474, 475
for object of class type
643
overriding a base class function
589, 651
in conditional expression
116
plural terms, not used in C++
xlv
declared type used for type checking
743
different meanings of
415
member access operator ->
461
near-equivalence to array
496
not a concrete data type
595
problems with copying
440
to same type being defined
699
used for variable-length items
429
using only inside class implementations
452
variable types relevant to
415
polluting the global namespace
927
avoiding an infinite regress during construction
720
base class constructor
719
base class destructor and
739
base class initializer
719
class registry function
745
key to implementation of
710
preventing infinite regress in
750
similarities between different types of
759
slicing avoided by using
732
adding types at link time
745
positional number systems
44
premature destruction
475
preprocessor directive
121, 863
in class declaration line
614
as creating a virtual computer
247
waterfall mode of development
4
programming defensively
796
protected member function
617
protected vs. private variables
599
in class declaration line
612
Purify, by Rational Software
454
use of single and double
104
Radio Shack TRS-80 Model III
283
references to pointers
689
regular member function
592
See also class, base class, derived class, polymorphic object
variable going out of
464
scope resolution operator::
screen, number of lines
951
short-circuit evaluation rule
390
different for each type of Vec
786
as a virtual computer
247
software development process
906
space after numeric value
937
allowed between components of a name
322
in assembly language program
79, 84
return addresses stored on
261
using for temporary storage
285
stack-based addressing
264
undesirable behavior when initialized with 0
878
standard member functions
implementing for polymorphic object
715
See also class, base class, derived class, polymorphic object
See also string class, homegrown string class, xstring classt
static protected member function
617
using in header files
335