getline() member function, 1106–1108
getline() method, 509, 1270
getname() function, 180–182
get_allocator() method, 1252
get_fun.cpp, 1107
global namespaces, 484
global scope, 454
global variables, compared to local variables, 467
good() method, 294
good() stream state method, 1097–1102
goodbit stream state, 1097–1102
gpp compiler, 22
greater than () operator, 217
greater than or equal to () operator, 217
H
handling exceptions, 896
hangman.cpp, 962–965
hardware, program portability, 16
harmonic mean, 896
harpo() function, 410
has-a relationships, 721, 788
header files, 448–449
climits, 71–73
converting to standard C++, 1331
creating, 530
cstring, 123–124
ctime, 229
iomanip, manipulators, 1091
iostream, 289
managing, 451
headers, filenames, 34
headers (function), 29–31, 55–56
heap operations
make_heap() function, 1305, 1314
pop_heap() function, 1305, 1314
push_heap() function, 1305, 1314
sort_heap() function, 1305, 1315
heaping
popping values off, 1314
pushing values onto, 1314
heaps
creating, 1314
defined, 1314
heap operations
make_heap() function, 1305, 1314
pop_heap() function, 1305, 1314
push_heap() function, 1305, 1314
sort_heap() function, 1305, 1315
sorting, 1315
heaps (memory), 182
hex manipulator, 1090–1091
hex manipulators, 1078–1079
hexadecimal numbers, 1216
binary equivalents, 1217–1218
hexoct2.cpp, 79
hierarchy, iterators, 999–1000
high-level languages, 11
history of C++, 10–15
C language
development history, 11
programming philosophy, 11–13
generic programming, 14
OOP, 13–14
hmean() function, 898–905
I
I/O (input/output), 1062, 1270
buffers, 1063–1067
redirecting, 1067–1068
streams, 1063–1067
text files, 287–288
reading, 292–298
writing to, 288–292
identifiers, special meanings, 1223
IDEs (integrated development environments), 19
if else statement, 255
example, 256–257
formatting, 257–258
if else if else construction, 258–260
syntax, 255
if statement, 254
bug prevention, 260
example, 255
syntax, 254
if.cpp, 255
ifelse.cpp, 257
ifelseif.cpp, 259
#ifndef directive, 451
ifstream objects, 1116–1119
ignore() member function, 1106–1108
ilist.cpp, 1053
imbuing, I/O with styles, 1077
implementation, changing, 521–522
implementation files, creating, 530
implicit conversion, 609
implicit instantiation, 428–430
implicit instantiations, 850
implicit keyword, 610
implicit member functions, 637–638
implicit upcasting, 807
in-class initialization, 1160
in-place algorithms, 1036
include (#include) directive, 33
include files, 96
includes() function, 1305, 1311
incore formatting, 1142–1145
increment operator (++), 197, 207–208
pointers, 210–211
postfixing, 209–210
prefixing, 209–210
indeterminate values, 73
indexes, 117
indirect values, 155
inequality operator (!=), 217
inheritance
dynamic memory allocation, 757
derived class does use new, 758–760
derived class doesn’t use new, 757–758
example, 761–766
exceptions, 922–927
sales.cpp, 924
sales.h, 922
use_sales.cpp, 925–927
references, 405–408
inheritance (class), 708
ABCs (abstract base classes), 746–749
ABC philosophy, 756
AcctABC example, 749–755
enforcing interface rules with, 757
assignment operators, 772–775
base classes
relationships with derived classes, 718–720
TableTennisPlayer example, 708–710
Constructors, 713–715
derived classes
creating, 711–712
header files, 716
method definitions, 716
objects, creating, 717–718
relationships with base classes, 718–720
has-a relationships, 721