|
|
 |
|
|
|
|
base 16 numbers, 453-455 |
|
|
|
 |
|
|
|
|
converting to base 10, 452 |
|
|
|
 |
|
|
|
|
base classes, 248-249, 283, 388 |
|
|
|
 |
|
|
|
|
abstract, 291, 294 |
|
|
|
 |
|
|
|
|
common (moving shared functionality into), 299 |
|
|
|
 |
|
|
|
|
creating clone methods, 276-279 |
|
|
|
 |
|
|
|
|
functions, hiding, 280 |
|
|
|
 |
|
|
|
|
initialization, 256 |
|
|
|
 |
|
|
|
|
methods, hiding, 262 |
|
|
|
 |
|
|
|
|
pointers, 283 |
|
|
|
 |
|
|
|
|
base methods, calling, 264-265 |
|
|
|
 |
|
|
|
|
base pointers, 284, 286 |
|
|
|
 |
|
|
|
|
BASIC, 6 |
|
|
|
 |
|
|
|
|
binary numbers, 450-451 |
|
|
|
 |
|
|
|
|
advantages, 451 |
|
|
|
 |
|
|
|
|
converting decimals to, 450 |
|
|
|
 |
|
|
|
|
binary operators, 212-214, 435. See also addition operator (+) |
|
|
|
 |
|
|
|
|
bits, 28, 451 |
|
|
|
 |
|
|
|
|
blocks |
|
|
|
 |
|
|
|
|
catch, 424, 428 |
|
|
|
 |
|
|
|
|
try, 424, 428 |
|
|
|
 |
|
|
|
|
bodies, 24-25 |
|
|
|
 |
|
|
|
|
functions, 64, 101 |
|
|
|
 |
|
|
|
|
bool type, 50 |
|
|
|
 |
|
|
|
|
Boolean variables, 436 |
|
|
|
 |
|
|
|
|
braces ({}), 42 |
|
|
|
 |
|
|
|
|
aligning, 434 |
|
|
|
 |
|
|
|
|
closing (}), 21 |
|
|
|
 |
|
|
|
|
if statements, 55-57 |
|
|
|
 |
|
|
|
|
opening ({), 21 |
|
|
|
 |
|
|
|
|
break statement, 115-117 |
|
|
|
 |
|
|
|
|
bugs, 422 |
|
|
|
 |
|
|
|
|
exceptions, 422-423 |
|
|
|
 |
|
|
|
|
finding, 101, 159, 299. See also errors |
|
|
|
 |
|
|
|
|
macros, 370 |
|
|
|
 |
|
|
|
|
poor logic, 422 |
|
|
|
 |
|
|
|
|
resulting from assert() statements, 359 |
|
|
|
 |
|
|
|
|
running out of resources, 422 |
|
|
|
 |
|
|
|
|
runtime, 299 |
|
|
|
 |
|
|
|
|
syntactic, 422 |
|
|
|
 |
|
|
|
|
unnecessary fragility, 422 |
|
|
|
 |
|
|
|
|
building prototypes, 389-390 |
|
|
|
 |
|
|
|
|
built-in variables, assigning (user-defined), 218 |
|
|
|
 |
|
|
|
|
bulletproof programs, 422 |
|
|
|
 |
|
|
|
|
buy/build question (designing programs), 389 |
|
|
|
 |
|
|
|
|
bytes, 28, 451 |
|
|
|
 |
|
|
|
|
C, 9 |
|
|
|
 |
|
|
|
|
C++ |
|
|
|
 |
|
|
|
|
ANSI, 10 |
|
|
|
 |
|
|
|
|
differences between C++ and C, 9 |
|
|
|
 |
|
|
|
|
getting help/advice, 439 |
|
|
|
 |
|
|
|
|
suggested reading |
|
|
|
 |
|
|
|
|
books, 439-440 |
|
|
|
 |
|
|
|
|
magazines, 440 |
|
|
|
 |
|
|
|
|
C++-style comments, 22 |
|
|
|
 |
|
|
|
|
C-style comments, 22 |
|
|
|
 |
|
|
|
|
call stack, 429 |
|
|
|
 |
|
|
|
|
calling |
|
|
|
 |
|
|
|
|
base methods, 264-265 |
|
|
|
 |
|
|
|
|
constructors, 254-256 |
|
|
|
 |
|
|
|
|
copy, 178-180, 200 |
|
|
|
 |
|
|
|
|
delete keyword, 146 |
|
|
|
 |
|
|
|
|
destructors, 200, 254-256 |
|
|
|
 |
|
|
|
|
objects, 178-180 |
|
|
|
 |
|
|
|
|
functions, 21-23, 61, 70-71, 78 |
|
|
|
 |
|
|
|
|
parameters, 73 |
|
|
|
 |
|
|
|
|
stack frames, 80 |
|
|
|
 |
|
|
|
|
this pointer, 154 |
|
|
|
 |
|
|
|
|
virtual member functions, 271 |
|
|
|
 |
|
|
|
|
constructors, 382 |
|
|
|
 |
|
|
|
|
calls (function), 429 |
|
|
|
 |
|
|
|
|
camel notation, 32 |
|
|
|
 |
|
|
|
|
case-sensitivity, 32 |
|
|
|
 |
|
|
|
|
casting, dynamic, 299 |
|
|
|
 |
|
|
|
|
catch blocks, 424, 428 |
|
|
|
 |
|
|
|
|
catch everything statement (catch() statement), 429 |
|
|
|
 |
|
|
|
|
catching exceptions, 424, 427-429 |
|
|
|
 |
|
|
|
|
changing |
|
|
|
 |
|
|
|
|
addresses (stack pointers), 79 |
|
|
|
 |
|
|
|
|
objects (value of members), 100 |
|
|
|
 |
|
|
|
|
values (pointers), 168-170 |
|
|
|
 |
|
|
|
|
char arrays, 239. See also strings |
|
|
|
 |
|
|
|
|
char variables, 29 |
|
|
|
 |
|
|
|
|
character arrays (uninitialized), 239 |
|
|
|
 |
|
|
|
|
character sets (ASCII), 30 |
|
|
|
 |
|
|
|
|
character variables, 30 |
|
|
|
 |
|
|
|
|
characters |
|
|
|
 |
|
|
|
|
null, 239 |
|
|
|
 |
|
|
|
|
strings, 239-240 |
|
|
|
 |
|
|
|
|
cin objects, 21, 26 |
|
|
|
 |
|
|
|
|
class constructors (allocating memory), 152-154 |
|
|
|
 |
|
|
|
|
class declarations, 91, 100-102 |
|
|
|
 |
|
|
|
|
class definitions, 438 |
|
|
|
 |
|
|
|
|
class invariants, 360, 364 |
|
|
|
 |
|
|
|
|
class keyword, 87 |
|
|
|
 |
|
|
|
|
class member functions, 99 |
|
|
|
 |
|
|
|
|
class method definitions, 101 |
|
|
|
 |
|
|
|
|
class methods, 94. See also constructors |
|
|
|
 |
|
|
|
|
declaring, 91 |
|
|
|
 |
|
|
|
|
defining, 91 |
|
|
|
 |
|
|
|
|
inline, 102 |
|
|
|
 |
|
|
|
|
size, 98 |
|
|
|
 |
|
|
|
|
class objects, 98 |
|
|
|
 |
|
|
|
|
classes, 8, 13, 86 |
|
|
|
 |
|
|
|
|
abstract, 298-299 |
|
|
|
 |
|
|
|
|
base, 248-249, 283, 388 |
|
|
|
 |
|
|
|
|
abstract, 291, 294 |
|
|
|
 |
|
|
|
|
common (moving shared functionality into), 299 |
|
|
|
 |
|
|
|
|
creating clone methods, 276-279 |
|
|
|
 |
|
|
|
|
pointers, 283 |
|
|
|
 |
|
|
|
|
clients, 87 |
|
|
|
 |
|
|
|
|
collapsing, 388 |
|
|
|
 |
|
|
|
|
complete, 105, 108 |
|
|
|
 |
|
|
|
|
complex, 105, 108 |
|
|
|
 |
|
|
|
|
contained (accessing members), 328 |
|
|
|
 |
|
|
|
|
creating, 386 |
|
|
|
 |
|
|
|
|
hierarchies, 286, 289 |
|
|
|
 |
|
|
|
|
data manipulation, 242 |
|
|
|
 |
|
|
|
|
data members, 87 |
|
|
|
 |
|
|
|
|
accessing, 89 |
|
|
|
 |
|
|
|
|
pointers, 152-154 |
|
|
|
 |
|
|
|
|
private, 90 |
|
|
|
 |
|
|
|
|
public, 89-90 |
|
|
|
 |
|
|
|
|
declaring, 87-88, 250, 351 |
|
|
|
 |
|
|
|
|
abstract data types, 290 |
|
|
|
 |
|
|
|
|
derived, 248-249, 251-252, 265-266, 283, 388 |
|
|
|
 |
|
|
|
|
acquiring data/methods, 387 |
|
|
|
|
|