Sams Teach Yourself C++ in 21 Days

(singke) #1
collaboration diagrams, 364
combining
arrays, 446
math operators with
assignment operators,
73-74
references and pointers,
280
command-line
processing, 631-634
comments, 32-33, 38
/* (C-style), 33
// (C++-style), 33
cautions, 34
example, 33-34
readability, 782-783
writing, 39
Compare( ) method, 881
compile time, 22
compile-time errors, 162
compilers, 6, 19, 752
assert( ) macro, 761-762
compiling with symbols,
747
errors, 20-21
intermediate files, saving,
752
troubleshooting, 20
compiling
errors, 20-21
Hello World program,
17-18
source code, 15
with symbols, 747
complement operator, 774
compound statements, 68-69
concatenating
strings, 759-760
values, 30
concatenation operator,
759-760
conditional operator,
94-95
conflict resolution, 637-642
const default, overriding,
642

const methods, 158-159,
249-251
const pointers, 248-251
declaring, 248-249
methods, 249-250
passing, 274-277
const statement, 60, 158,
172-173, 784
const this pointers, 251
constants, 59. See also
variables
in arrays, 415
changing, 60
defining, 60
enumerated, 61-63
literals, 59
substitutions, 753
symbolic, 59-60, 64
constructors, 154
base constructors,
passing arguments to,
381-385
contained classes, 546-549
copy constructors,
298-302
deep copies, 298,
301-302
member-wise copies,
298
parameters, 298
virtual, 400-403
defaults, 154-158, 295
inheritance, 378-381
initializing, 297
member variables, 297
multiple constructors,
calling, 460-463
overloading, 294-296, 381,
384
specialized, 688
containment, 342-343, 537,
693
compared to delegation,
553-561
compared to private
inheritance, 590

contained classes
accessing members of,
545
class design, 358-359
compared to
delegation, 553-561
constructors, 546-549
costs, 546-549
Employee class,
542-544
filtering access to, 545
implementing, 552-553
passing by value,
549-552
String class, 538-542
costs, 546-549
implementing, 552-553
continue statements,
180-182
contravariance, 803-804
conversion operators
creating, 321-323
sample program, 323-324
conversion specifiers,
620-621
Convert( ) function, 106
converting
base 10 to base 6, 810
base 10 to base 7, 809-810
base 10 to binary, 810-811
data types, 320-324
decimals to binary,
813-814
Fahrenheit/Celsius, 106
copy constructors, 298-302
deep copies, 298, 301-302
member-wise copies, 298
parameters, 298
virtual, 400-403
copying strings, 435-436
Counter class
Counter object
converting int to,
321-322
converting to unsigned
short, 324

Counter class 891

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

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

Free download pdf