sizeof operator, 71–73
smart pointers, 1158
selecting, 977–978
sort() function, 987–988, 1041, 1304, 1307
sort_heap() function, 1305
sort() method, 1016–1017, 1280
sort() STL function, 991
sorting
heaps, 1315
nth_element() function, 1304, 1308, 1315
partial_sort_copy() function, 1304, 1307–1308
partial_sort() function, 1304, 1307
sort() function, 1304, 1307
stable_sort() function, 1304, 1307
vectors, 987
source code, 19
definition of, 18
file extensions, 20
special meanings, identifiers, 1223
special member functions, 1178–1179
specializations
explicit, 425, 850–851
example, 426–428
third-generation specialization, 425–426
explicit instantiations, 850
implicit instantiations, 850
partial specializations, 851–852
specifiers
storage class, 472–473
splice() method, 1016, 1280
sqrt.cpp, 51
sqrt() function, 50–52
square() function, 381–382
stable_partition() function, 1295, 1303
stable_sort() function, 1304, 1307
stack, unwinding, 909–910, 913–914
stack class, 831–836
pointers, 837–843
templates, 1018
stack containers, 1018
stack.cpp, 554–555
stack.h, 553–554
stacker.cpp, 556–557
stacks, 553–557
automatic variables, 458–459
stacktem.cpp, 835–836
stacktp.h, 834
standard C++, converting to, 1327
autoptr template, 1333
C++ features, 1331
const instead of #define, 1327–1329
function prototypes, 1330
header files, 1331
inline instead of #define, 1329–1330
namespaces, 1331–1333
STL (Standard Template Library), 1334
string class, 1333
type casts, 1330–1331
Standard Input/Output, ANSI C, 1062
Standard Template Library.
state members, 597–599
statements, 41
assignment statements, 43–44
blocks, 212–214
break, 280–282
cin, 46
loops, 234–235
compared to expressions, 201
continue, 280–282
cout, 36
concatenated output, 46–47
cout.put() function, 83–84
endl manipulator, 37–38
integer values, displaying, 44–45
\n newline character, 38–39
declaration statements, 41–43
defined, 29–30
enum, 278–280
examples, 41, 45
for, declaration-statement expressions, 203
if, 254
bug prevention, 260
example, 255
syntax, 254
if else, 255
example, 256–257
formatting, 257–258
if else if else construction, 258–260
syntax, 255
return statements, 30
switch, 274–278
enumerators as labels, 278–280
example, 275–278
syntax, 275
terminators, 30
void, 53
static assert, 1204
static binding, 164, 172–173, 737, 740
static_cast operator, 945–946
static class members, 628–637
static keyword, 183, 472
functions, 475
static memory storage, 182–183
static storage duration, 453
static type checking, 313
static variables, 453, 459–462, 466
external, 466
external linkage, 463, 466–467
internal linkage, 467–470
no linkage, 470–472
static.cpp, 470–471
stcktp1.h, 839–840
std namespace, 59
stdexcept exception classes, 918–920
Stepanov, Alexander, 978, 1205
stkoptr1.cpp, 841–842
STL (Standard Template Library), 978, 1041, 1044, 1271, 1334
algorithms, 1035
groups, 1035–1036
properties, 1036–1037
associative containers, 1018, 1026
multimap, 1023–1025
set, 1019–1022
binary search operations
binary_search() function, 1304, 1310
equal_range() function, 1304, 1309
lower_bound() function, 1304, 1309
upper_bound() function, 1304, 1309
C++11, 1271
containers, 1271–1273
container concepts, 1007
container methods compared to functions, 1039–1041
properties, 1008–1010
sequence requirements, 1011–1012
container methods, 1275–1277
container types
deque, 1013
list, 1014–1017
priority_queue, 1017–1018
queue, 1017
stack, 1018
vector, 1012–1013
containers, 1161
deque methods, 1278–1280
functions, 1286
adjacent_find(), 1287, 1290
copy(), 1293–1296
copy_backward(), 1294–1297
count(), 1287, 1291
count_if(), 1287, 1291
equal(), 1288, 1291–1292
fill(), 1294, 1299
fill_n(), 1294, 1299
find(), 1287–1289
find_end(), 1287–1290
find_first_of(), 1287, 1290
find_if(), 1287–1289
for_each(), 1287–1289
generate(), 1294, 1299
generate_n(), 1294, 1299
iter_swap(), 1294
mismatch(), 1288, 1291
partition(), 1295, 1302–1303
random_shuffle(), 1295, 1302
remove(), 1295, 1299