Sams Teach Yourself C++ in 21 Days

(singke) #1
recursion, 124-128
Fibonacci series example,
125-128
stop conditions, 124-125
redirect input command (<),
598
redirect output command
(>), 598
redirection (streams), 598
redirection operators, 17,
28, 598
reference operator (&), 256,
280-281
references, 255-257
combining with pointers,
280
compared to pointers,
279-280
const pointers, 274-277
creating, 256-257, 262
errors
nonexistent objects,
281-283
referencing objects on
heap, 283-285
initializing, 257
naming, 256
null, 262
objects, 260-261
nonexistent objects,
281-283
objects on heap,
283-285
passing by reference,
262-265, 271-274
passing to objects,
277-279
reassigning, 259
returning multiple values,
270-271
swap( ) function, 265-267
target addresses
assigning, 259-260
returning, 257-258
relational operators, 79-80
branching, 81-82
precedence, 92-93

relationships (classes)
containment, 358-359
discriminators, 360-363
multiple inheritance,
358-359
powertypes, 360-363
remove( ) function, 700
requirements documents,
335-336
application analysis, 347
artifacts, 349-350
project budgets and time-
lines, 348
systems analysis, 347-348
use-case analysis, 336-337
actors, 337
customer roles,
337-339
domain models,
339-343
guidelines, 344-346
interaction diagrams,
346-347
packages, 347
scenarios, 343-344
visualizations, 349
reserved words, 49-50, 817
resizing arrays at runtime,
429-432
resolving name conflicts,
638-642
resources, 785
responsibilities (CRC
sessions), 355
restoring memory to free
space, 235-237
retrieving data in
exceptions, 735
return statements, 36,
114-115
return values (functions),
36, 100-103, 114-115
returning
multiple values
pointers, 268-270
references, 270-271
temporary objects,
306-309

reusing source code, 10-11
right flag, 618
RTTI (Run Time Type
Identification), 453
Rumbaugh, James, 332
Run Time Type
Identification (RTTI), 453
run-time binding, 395
running
functions, 105
Hello World program, 18
runtime, resizing arrays at,
429-432

S

%s conversion specifier, 620
scenarios (use cases),
343-344
scientific flag, 618
scope
for loops, 195-196
variables, 105-109,
640-641
visibility, 640
scope resolution operator
(::), 640
screens, printing to, 28-30
security, 148-149
self-assigned addition
operator (+=), 74
semicolon (;), 68, 83
sequence diagrams, 363-364
sessions (CRC), 354-355
SetAge( ) method, 153, 241
setf( ) method, 617-618, 620
SetFirstName( ) function,
544
SetLastName( ) function,
544
sets, 444
setw manipulator, 618
shallow copies, 298, 318
Shape classes, 474-476
shared base classes, 464-468
short data type, 53-54, 64
short int data type, 46

906 recursion

34 0672327112 index.qxd 11/19/04 12:31 PM Page 906

Free download pdf