|
|
 |
|
|
|
|
delete, 145-146 |
|
|
|
 |
|
|
|
|
enum, 39 |
|
|
|
 |
|
|
|
|
inline, 76, 102 |
|
|
|
 |
|
|
|
|
new, 144 |
|
|
|
 |
|
|
|
|
protected, 252 |
|
|
|
 |
|
|
|
|
return, 71 |
|
|
|
 |
|
|
|
|
struct, 109 |
|
|
|
 |
|
|
|
|
typedef, 34-35 |
|
|
|
 |
|
|
|
|
knowledge, 387, 393. See also data |
|
|
|
 |
|
|
|
|
l-values, 44-45 |
|
|
|
 |
|
|
|
|
less than operator (<), 50-51 |
|
|
|
 |
|
|
|
|
less than or equal to operator (<=), 50-51 |
|
|
|
 |
|
|
|
|
levels |
|
|
|
 |
|
|
|
|
debugging, 366, 369 |
|
|
|
 |
|
|
|
|
defining, 366 |
|
|
|
 |
|
|
|
|
libraries, 13 |
|
|
|
 |
|
|
|
|
line length (writing code), 435 |
|
|
|
 |
|
|
|
|
_LINE_ macro (predefined), 357 |
|
|
|
 |
|
|
|
|
link-time, 17 |
|
|
|
 |
|
|
|
|
linkable files, 13 |
|
|
|
 |
|
|
|
|
linked lists, 302, 309-314 |
|
|
|
 |
|
|
|
|
allocating, 309 |
|
|
|
 |
|
|
|
|
Compare() method, 309 |
|
|
|
 |
|
|
|
|
creating, 303 |
|
|
|
 |
|
|
|
|
delegating responsibility, 310 |
|
|
|
 |
|
|
|
|
doubly linked, 302 |
|
|
|
 |
|
|
|
|
nodes, inserting, 310-312 |
|
|
|
 |
|
|
|
|
singly linked, 302 |
|
|
|
 |
|
|
|
|
trees, 302 |
|
|
|
 |
|
|
|
|
linkers, 6 |
|
|
|
 |
|
|
|
|
linker-time, 17 |
|
|
|
 |
|
|
|
|
turning object files into executable programs, 12 |
|
|
|
 |
|
|
|
|
linking, 6 |
|
|
|
 |
|
|
|
|
List objects (parameterized), declaring, 404-405 |
|
|
|
 |
|
|
|
|
listings. See code listings |
|
|
|
 |
|
|
|
|
lists |
|
|
|
 |
|
|
|
|
linked, 302-303, 309-314 |
|
|
|
 |
|
|
|
|
nodes, 304 |
|
|
|
 |
|
|
|
|
objects, adding, 314 |
|
|
|
 |
|
|
|
|
parameterized, 411-412 |
|
|
|
 |
|
|
|
|
literal constants, 37, 40 |
|
|
|
 |
|
|
|
|
local variables, 66, 70-71, 81 |
|
|
|
 |
|
|
|
|
free store, 143 |
|
|
|
 |
|
|
|
|
stacks, 80, 143 |
|
|
|
 |
|
|
|
|
locations, determining (catch blocks/try blocks), 428 |
|
|
|
 |
|
|
|
|
logic bugs, 422 |
|
|
|
 |
|
|
|
|
logical AND statement, 57-58 |
|
|
|
 |
|
|
|
|
logical NOT statement, 58 |
|
|
|
 |
|
|
|
|
logical operators, 57-59 |
|
|
|
 |
|
|
|
|
logical OR statement, 58 |
|
|
|
 |
|
|
|
|
long int variables, 29 |
|
|
|
 |
|
|
|
|
long variable types, 35 |
|
|
|
 |
|
|
|
|
long variables, 40 |
|
|
|
 |
|
|
|
|
loops, 111 |
|
|
|
 |
|
|
|
|
dowhile, 119-120 |
|
|
|
 |
|
|
|
|
event, 380, 382 |
|
|
|
 |
|
|
|
|
for, 121 |
|
|
|
 |
|
|
|
|
empty, 124-126 |
|
|
|
 |
|
|
|
|
example, 122 |
|
|
|
 |
|
|
|
|
multiple initialization, 122-123 |
|
|
|
 |
|
|
|
|
null statements, 123-125 |
|
|
|
 |
|
|
|
|
sequence of operations, 122 |
|
|
|
 |
|
|
|
|
goto |
|
|
|
 |
|
|
|
|
disadvantages, 112 |
|
|
|
 |
|
|
|
|
example, 111-112 |
|
|
|
 |
|
|
|
|
infinite, 310, 380 |
|
|
|
 |
|
|
|
|
nesting, 126-127 |
|
|
|
 |
|
|
|
|
programming tips, 118 |
|
|
|
 |
|
|
|
|
while |
|
|
|
 |
|
|
|
|
break statement, 115-117 |
|
|
|
 |
|
|
|
|
complex expressions, 114-115 |
|
|
|
 |
|
|
|
|
continue statement, 115-117 |
|
|
|
 |
|
|
|
|
simple example, 113 |
|
|
|
 |
|
|
|
|
while(true), 117-118, 380 |
|
|
|
 |
|
|
|
|
low-level program designing, 377 |
|
|
|
 |
|
|
|
|
machine language, 6 |
|
|
|
 |
|
|
|
|
macro functions, 352-353, 370 |
|
|
|
 |
|
|
|
|
macros |
|
|
|
 |
|
|
|
|
advantages, 355 |
|
|
|
 |
|
|
|
|
assert() |
|
|
|
 |
|
|
|
|
compiler-provided, 357 |
|
|
|
 |
|
|
|
|
DEBUG, 357-358 |
|
|
|
 |
|
|
|
|
writing, 357-358 |
|
|
|
 |
|
|
|
|
bugs, 370 |
|
|
|
 |
|
|
|
|
debugging, 355 |
|
|
|
 |
|
|
|
|
managing, 355 |
|
|
|
 |
|
|
|
|
names, 370 |
|
|
|
 |
|
|
|
|
parameters, 353 |
|
|
|
 |
|
|
|
|
parentheses, 353-355 |
|
|
|
 |
|
|
|
|
predefined, 357 |
|
|
|
 |
|
|
|
|
problems, 355 |
|
|
|
 |
|
|
|
|
substitution in, 355 |
|
|
|
 |
|
|
|
|
main() function, 21-26, 61, 70-71, 351 |
|
|
|
 |
|
|
|
|
returning values, 21-23 |
|
|
|
 |
|
|
|
|
maintaining code, 60-62 |
|
|
|
 |
|
|
|
|
managing macros, 355 |
|
|
|
 |
|
|
|
|
manipulating |
|
|
|
 |
|
|
|
|
addresses (pointers), 141 |
|
|
|
 |
|
|
|
|
data |
|
|
|
 |
|
|
|
|
classes, 242 |
|
|
|
 |
|
|
|
|
pointers, 139-141 |
|
|
|
 |
|
|
|
|
strings, 355 |
|
|
|
 |
|
|
|
|
mathematical operators, 45-46 |
|
|
|
 |
|
|
|
|
member access operator (.), 166 |
|
|
|
 |
|
|
|
|
member data |
|
|
|
 |
|
|
|
|
accessing, 166, 229 |
|
|
|
 |
|
|
|
|
classes, 322 |
|
|
|
 |
|
|
|
|
normal, 318 |
|
|
|
 |
|
|
|
|
private, 98 |
|
|
|
 |
|
|
|
|
public, 98 |
|
|
|
 |
|
|
|
|
static, 317, 319-320 |
|
|
|
 |
|
|
|
|
member functions, 87. See also methods |
|
|
|
 |
|
|
|
|
constructors, 94-95 |
|
|
|
 |
|
|
|
|
default values, declaring, 196-198 |
|
|
|
 |
|
|
|
|
pointers, 340-342 |
|
|
|
 |
|
|
|
|
arrays, 342-344 |
|
|
|
 |
|
|
|
|
creating, 340 |
|
|
|
 |
|
|
|
|
static, 320, 345 |
|
|
|
 |
|
|
|
|
virtual (calling), 271 |
|
|
|
 |
|
|
|
|
member operator (.), 94, 229 |
|
|
|
 |
|
|
|
|
member variables, 87. See also data members |
|
|
|
 |
|
|
|
|
initializing, 199 |
|
|
|
 |
|
|
|
|
member-wise copies, 200 |
|
|
|
 |
|
|
|
|
static, 318 |
|
|
|
 |
|
|
|
|
member-wise copies, 200, 216 |
|
|
|
 |
|
|
|
|
members, 87. See also data members |
|
|
|
 |
|
|
|
|
contained (filtering access), 328 |
|
|
|
 |
|
|
|
|
contained classes, 328 |
|
|
|
|
|