|
|
 |
|
|
|
|
objects |
|
|
|
 |
|
|
|
|
creating/deleting (free store), 150-151 |
|
|
|
 |
|
|
|
|
derived, 252-253 |
|
|
|
 |
|
|
|
|
passing (references), 178-179 |
|
|
|
 |
|
|
|
|
operators |
|
|
|
 |
|
|
|
|
dynamic cast, 284-285 |
|
|
|
 |
|
|
|
|
increment, overloading, 209 |
|
|
|
 |
|
|
|
|
prefix/postfix, 47-48, 211-212 |
|
|
|
 |
|
|
|
|
parameters, 66-68 |
|
|
|
 |
|
|
|
|
parentheses in macros, 354 |
|
|
|
 |
|
|
|
|
passing by value, 70 |
|
|
|
 |
|
|
|
|
passing values |
|
|
|
 |
|
|
|
|
pointers, 169 |
|
|
|
 |
|
|
|
|
references, 167-171 |
|
|
|
 |
|
|
|
|
pointers |
|
|
|
 |
|
|
|
|
allocating and deleting, 146 |
|
|
|
 |
|
|
|
|
const objects, 157-158 |
|
|
|
 |
|
|
|
|
contents, exploring, 141-142 |
|
|
|
 |
|
|
|
|
data members, 152-153 |
|
|
|
 |
|
|
|
|
functions, 331-332 |
|
|
|
 |
|
|
|
|
manipulating data, 140 |
|
|
|
 |
|
|
|
|
member functions, 340-342 |
|
|
|
 |
|
|
|
|
passing to functions as function arguments, 336-337 |
|
|
|
 |
|
|
|
|
passing values, 172-173 |
|
|
|
 |
|
|
|
|
references |
|
|
|
 |
|
|
|
|
assigning, 165 |
|
|
|
 |
|
|
|
|
creating and using, 162-163 |
|
|
|
 |
|
|
|
|
passing, 183-184 |
|
|
|
 |
|
|
|
|
passing values, 174-175 |
|
|
|
 |
|
|
|
|
taking addresses, 163-164 |
|
|
|
 |
|
|
|
|
returning references to nonexistent objects, 186 |
|
|
|
 |
|
|
|
|
simple functions, 25 |
|
|
|
 |
|
|
|
|
size of variable types, 29 |
|
|
|
 |
|
|
|
|
static member data, 318-319 |
|
|
|
 |
|
|
|
|
strncpy(), 241 |
|
|
|
 |
|
|
|
|
String class, 322-325 |
|
|
|
 |
|
|
|
|
String class and driver program, 325, 327 |
|
|
|
 |
|
|
|
|
strncpy(), 241-242 |
|
|
|
 |
|
|
|
|
switch statement, 128-129 |
|
|
|
 |
|
|
|
|
this pointer, 154-155 |
|
|
|
 |
|
|
|
|
typedef |
|
|
|
 |
|
|
|
|
demonstrating, 34 |
|
|
|
 |
|
|
|
|
pointers to functions, 338-339 |
|
|
|
 |
|
|
|
|
values |
|
|
|
 |
|
|
|
|
default, 196-197 |
|
|
|
 |
|
|
|
|
default parameter, 74 |
|
|
|
 |
|
|
|
|
printing in DEBUG mode, 365 |
|
|
|
 |
|
|
|
|
variables |
|
|
|
 |
|
|
|
|
addresses, 134-135 |
|
|
|
 |
|
|
|
|
assigning built-in to user-defined, 219 |
|
|
|
 |
|
|
|
|
demonstrating, 33 |
|
|
|
 |
|
|
|
|
local, 66-68 |
|
|
|
 |
|
|
|
|
virtual constructors, 276, 278 |
|
|
|
 |
|
|
|
|
virtual member functions calling multiple in turn, 269, 271 |
|
|
|
 |
|
|
|
|
virtual methods, 268-269, 282 |
|
|
|
 |
|
|
|
|
while loops |
|
|
|
 |
|
|
|
|
break and continue statements, 115-117 |
|
|
|
 |
|
|
|
|
complex while loop, 114 |
|
|
|
 |
|
|
|
|
simple while loop, 113 |
|
|
|
 |
|
|
|
|
skipping body of, 119 |
|
|
|
 |
|
|
|
|
while loop reexamined, 121 |
|
|
|
 |
|
|
|
|
while(true) loop, 117-118 |
|
|
|
 |
|
|
|
|
wrapping around |
|
|
|
 |
|
|
|
|
signed variables, 37 |
|
|
|
 |
|
|
|
|
unsigned variables, 36 |
|
|
|
 |
|
|
|
|
code space, 143 |
|
|
|
 |
|
|
|
|
collapsing classes, 388 |
|
|
|
 |
|
|
|
|
combining |
|
|
|
 |
|
|
|
|
arrays, 243 |
|
|
|
 |
|
|
|
|
operators, 45-46 |
|
|
|
 |
|
|
|
|
command line, defining from, 352 |
|
|
|
 |
|
|
|
|
commands |
|
|
|
 |
|
|
|
|
#define, 349-351 |
|
|
|
 |
|
|
|
|
conditional compiling, 352 |
|
|
|
 |
|
|
|
|
string substitutions, 348 |
|
|
|
 |
|
|
|
|
substituting for constants, 348 |
|
|
|
 |
|
|
|
|
#else |
|
|
|
 |
|
|
|
|
conditional compiling, 352 |
|
|
|
 |
|
|
|
|
precompiler, 349 |
|
|
|
 |
|
|
|
|
#endif, 349 |
|
|
|
 |
|
|
|
|
#ifdef |
|
|
|
 |
|
|
|
|
conditional compiling, 352 |
|
|
|
 |
|
|
|
|
precompiler, 349 |
|
|
|
 |
|
|
|
|
#ifndef |
|
|
|
 |
|
|
|
|
conditional compiling, 352 |
|
|
|
 |
|
|
|
|
precompiler, 349 |
|
|
|
 |
|
|
|
|
#undef, 352 |
|
|
|
 |
|
|
|
|
comments, 22, 436-437 |
|
|
|
 |
|
|
|
|
C++-style, 22 |
|
|
|
 |
|
|
|
|
C-style, 22 |
|
|
|
 |
|
|
|
|
double slash (//), 22, 26 |
|
|
|
 |
|
|
|
|
slash-star (/*), 22, 26 |
|
|
|
 |
|
|
|
|
star-slash (*/), 22, 26 |
|
|
|
 |
|
|
|
|
writing, 23 |
|
|
|
 |
|
|
|
|
common functionality, 298 |
|
|
|
 |
|
|
|
|
common base classes (moving shared functionality into), 299 |
|
|
|
 |
|
|
|
|
common root classes, 386 |
|
|
|
 |
|
|
|
|
Compare() method, 309 |
|
|
|
 |
|
|
|
|
compile-time errors, 15-17, 63-64, 81, 101, 280, 289, 298 |
|
|
|
 |
|
|
|
|
compilers, 6, 11, 20 |
|
|
|
 |
|
|
|
|
adding .CPP files, 101 |
|
|
|
 |
|
|
|
|
allocating memory, 135 |
|
|
|
 |
|
|
|
|
assert() macro, 357 |
|
|
|
 |
|
|
|
|
built-in text editors, 17 |
|
|
|
 |
|
|
|
|
classes (data manipulation), 242 |
|
|
|
 |
|
|
|
|
compile-time, 17 |
|
|
|
 |
|
|
|
|
copy constructors (default), 200 |
|
|
|
 |
|
|
|
|
default constructors, 95 |
|
|
|
 |
|
|
|
|
default destructors, 95 |
|
|
|
 |
|
|
|
|
errors, 73, 109, 250 |
|
|
|
 |
|
|
|
|
finding bugs, 299 |
|
|
|
 |
|
|
|
|
integrated development environments (IDE), 12 |
|
|
|
 |
|
|
|
|
intermediate files, saving, 348 |
|
|
|
 |
|
|
|
|
pointers |
|
|
|
 |
|
|
|
|
adding to, 236 |
|
|
|
 |
|
|
|
|
decrementing, 236 |
|
|
|
 |
|
|
|
|
incrementing, 236 |
|
|
|
 |
|
|
|
|
null, 145 |
|
|
|
 |
|
|
|
|
predefined macros, 357 |
|
|
|
 |
|
|
|
|
preprocessors, 347-348 |
|
|
|
 |
|
|
|
|
stacks, 78 |
|
|
|
 |
|
|
|
|
text editors, 11 |
|
|
|
 |
|
|
|
|
turning source code into programs, 12 |
|
|
|
|
|