Sams Teach Yourself C++ in 21 Days

(singke) #1
overloading
compared to overriding,
387
functions/methods,
118-121
constructors, 294-296,
381, 384
example, 289-292
when to use, 294
operators, 302-303
addition, 314-316
friend functions,
580-585
guidelines, 317
insertion, 585-589
limitations, 316-317
postfix, 311
prefix, 304-306
temporary objects,
306-309
this pointer, 309-310
overriding
compared to hiding, 389
compared to over-loading,
387
const default, 642
methods, 385-387
ownership of pointers, 285

P

p( ) function, 653
packages, 347
Pane class, 648
parameterized templates,
661
parameterized types.
Seetemplates
parameters, 36, 101, 113
command-line processing,
631-634
copy constructors, 298
defaults, 116-118
get( ) method, 606
macros, 757

passing
to base constructors,
381-385
by reference, 262-265,
271-274
by value, 109-110, 134,
263-264, 549-552
parentheses ( ), 96
macro syntax, 757-759
nesting, 78
parsing character strings,
423-425
partitioning RAM
(random access memory),
130-132
PartsList class, 554-561
passing
exceptions, 739-742
objects, 397-399
parameters
by reference, 262-265,
271-274
by value, 109-110, 134,
263-264, 549-552
to base constructors,
381-385
pointers
const pointers, 274-277
pointers to functions,
523-525
references to objects,
277-279
template objects, 678-682
peek( ) method, 611-612
percolating shared
functions, 452
period (.), 150, 239
persistence of variables, 233
pipe character (|), 91
piping, 598
plus sign (+)
addition operator, 314-316
increment operator, 74-76
prefix operator, 304-306,
311-313
Point class, 166-167

pointers, 221-224, 227-228
advantages, 232
allocating, 236
arrays, 421-423, 426-428
combining with
references, 280
compared to references,
279-280
const, 248-251
declaring, 248-249
methods, 249-250
passing, 274-277
const this, 251
current values, printing,
769-771
data manipulation,
228-229
as data members on free
store, 241-243
declaring, 224, 231
deleting, 235-236
dereferencing, 226, 232
function pointers
advantages, 517-520
arrays, 521-523
assigning, 517
declaring, 514
dereferencing, 520
example, 514-517
passing, 523-525
typedef statement,
525-528
indirection, 225
initializing, 224, 232
memory addresses
assigning, 224-225
examining, 229-231
retrieving, 226
memory leaks, 237
method pointers
arrays, 531-532
declaring, 528
example, 528-530
invoking, 528
naming, 224
null, 224, 248, 262

pointers 903

How can we make this index more useful? Email us at [email protected]

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

Free download pdf