structures, 145–146
when to use, 644
equality operator (==), compared to assignment operator, 218–220
equal() function, 1288–1292
equal.cpp, 219
equality operator (==), 217
compared to assignment operator, 218–220
equal_range() function, 1024, 1304, 1309
equal_range() method, 1283, 1285–1286
erase() method, 982–984, 1267, 1278, 1282
erasing strings, 1267–1268
error codes, returning, 898–900
error handling.
error1.cpp, 897–898
error2.cpp, 899
error3.cpp, 901
error4.cpp, 906–907
error5.cpp, 910, 913
escape sequences, 84–85
estimate() function, 362–364
eternal loops, 232
exact matches, 432–434
exceed.cpp, 75
exception class, 917
exception handlers, 900, 933
exception handling, 896–897, 900, 933
abort() function, 897–898
bad_alloc exceptions, 921
catching exceptions, 900, 916–917
cautions, 931–932
error codes, returning, 898–900
exception class, 917
exception handlers, 900
inheritance, 922–927
sales.cpp, 924
sales.h, 922
use_sales.cpp, 925–927
invalid_argument exceptions, 919
length_error exceptions, 919
logic_error exceptions, 918
objects as exceptions, 903–908
out_of_bounds exceptions, 919
range_error exceptions, 919
real-world note, 933
runtime_error exceptions, 919
stdexcept exception classes, 918–920
throwing exceptions, 900, 915–916
try blocks, 901–903
uncaught exceptions, 928–931
unexpected exceptions, 928–931
unwinding the stack, 909–910, 913–914
exception specifications, C++11, 908
exceptions, 1158
exceptions() stream state method, 1098–1102
exclamation point (!), logical NOT operator, 267–269
alternative representations, 270
precedence, 269
exc_mean.cpp, 905–906
executable code, 18
exit() function, 930
explicit, 1159–1160
explicit instantiations, 428–430, 850
explicit keyword, 610
explicit specializations, 425, 850–851
example, 426–428
third-generation specialization, 425–426
exporting, templates, 1162
express.cpp, 200
expression arguments, 844
expressions, 97, 200–202
combining with comma operator, 214
compared to statements, 201
conditional operator (?::), 273–274
declaration-statement expressions, 202
logical AND (&&), 262
alternative representations, 270
example, 263–265
precedence, 269–270
ranges, 265–267
logical NOT (!), 267–269
alternative representations, 270
precedence, 269
logical OR (||), 260–262
alternative representations, 270
example, 261–262
precedence, 269
relational operators, 217–218, 220
C-style strings, comparing, 220–223
equality operator (==), 218–220
string class strings, comparing, 223–224
table of, 217
sequence points, 208–209
side effects, 201, 208–209
type conversions, 105–106
extern keyword, 467–472
functions, 474
external declarations, 143
external linkage, 454
external variables, 463, 466–467
external.cpp, 465
ext_permutation() algorithm, 1038
F
factorials, calculating, 203–205
fail() method, 296, 1101
fail() stream state method, 1098–1102
failbit stream state, 1097–1102
failbits, 130
fields
bit fields, 148
width, 1080–1081
file extensions, 20
file I/O, 1114
checking stream states, 1118–1119
command-line processing, 1119–1120
file modes, 1122
appending data to files, 1125–1127
binary, 1127–1133
constants, 1122–1123
opening files, 1124–1125
text, 1129
files, random access, 1133–1142
opening multiple files, 1119
reading, 1116–1118
writing, 1115–1118
file scope, 454
file1.cpp, 451
file2.cpp, 452
filefunc.cpp, 406–407
fileio.cpp, 1117
files, 1129
associating objects with, 289
client files, creating, 533–536
climits, 71–73
compiling separately, 447–449, 453
cpp filename extension, 28
ctime, 229
EOF (end-of-file) conditions, 237–240
header filenames, 34
header files, 448–449
converting to standard C++, 1331
creating, 530
cstring, 123–124
managing, 451
implementation files, creating, 530
include files, 96