Object code, 9–11, 26–27
Object-oriented programming (OOP), 16–17
classes, 17
encapsulation, 17, 566
inheritance, 17
polymorphism, 17
program design using, 16–17
Objects, 314–317, 556, 568, 571–572, 578–590
assignment operator (=
) used with, 571–572
classes and, 317–317, 556, 568
constructors for, 578–590
file I/O and, 314–317
initialization of, 578–585
member functions, 314, 578–590
public
and private
specification, 568
shallow copy, 571–572
streams and, 314–317
Off-by-one error, 162
ofstream
, 310–311, 320
Op
operator, 74
open
function, 311–312, 320
Operating systems, computer software for, 7
Operators, 69–74, 77–82, 87–91, 112–120, 311, 318–320, 466, 645–660, 1036–1037, 1052–1053
arithmetic, 69–74, 112–116
Boolean expressions, 77–79, 112–120
comparison, 77–82
decrement (––
), 87–91
extraction (>>), 311, 318–320, 466, 652–660
increment (++), 87–91
insertion (<<), 312, 318–320, 331, 466, 652–660
overloading, 645–660, 1052–1053
precedence, 114–115, 1036–1037
unary, 87, 651–652
Or operator (||
), 78, 80, 112–116
Output, 3, 21–23, 50–56, 58, 308–314, 325–340
computer hardware devices, 3
cout
statements, 21–23, 50–52
decimal points for formatting numbers, 55–56
double
statements, 55–56
escape sequences, 53–55
flags, 327–329
formatting functions, 325–340
insertion operator (<<
) for, 312
manipulators, 331
new-line instruction (\n
) for, 54–55, 58
streams, 50, 308–314, 325–340
writing files, 310–312
Output iterators, 975
out_stream
, 309, 310–312, 314–316, 320, 327–328
Overloading, 232–238, 580, 645–660, 823, 1047–1048, 1052–1053
array index, 1047–1048
constructors, 580
extraction operator (>>), 652–660
function names, 232–238
insertion operator (<<
), 652–660
operators, 645–660, 1052–1053
recursion compared to, 823
type conversion and, 238, 649–651
unary operators, 651–652
Overriding functions, 871