inline instead of #define, 1329–1330

namespaces, 1331–1333

STL (Standard Template Library), 1334

string class, 1333

type casts, 1330–1331

converting data types, 102, 606–612

applying automatically, 616–618

conversion functions, 612–616

conversion in arguments, 106

conversion in expressions, 105–106

conversion on assignment, 103–104

friends, 618–621

implicit conversion, 609

type casts, 107–109, 606–612

coordin.h, 449–450

coordinates

converting, 348–351

polar coordinates, 347

rectangular coordinates, 346

copy constructable objects, 1008

copy constructors, 639, 767

deep copying, 642–644

limitations, 640–642

shallow copying, 640

when to use, 639–640

copy() function, 1293–1296

iterators, 1001–1002

copy() method, 1269

copying

deep copying, 642–644

shallow copying, 640

strings, 135, 1269

copying algorithms, 1036

copyit.cpp, 1004

copy_backward() function, 1294–1297

count() function, 862, 1042, 1287, 1291

count() method, 1283

count.cpp, 1121

count_if() function, 1287, 1291

counts() function, 862

cout object, 1067–1069

buffers, flushing, 1075–1076

concatenation, 1071–1072

field width display, 1080–1081

fill characters, 1081–1082

floating-point display precision, 1082–1083

formatting data types, 1076–1078

methods, 1071–1075

number base display, 1078–1079

printing trailing zeros/decimal points, 1083–1090

cout statement, 36

concatenated output, 46–47

cout.put() function, 83

endl manipulator, 37–38

integer values, displaying, 44–45

\n newline character, 38–39

cout.put() function, 83–84

covariance of return type, 744

cpp filename extension, 28

CRC cards, 1207

cstring header file, 123–124

ctime header file, 229

cube() function, 309, 312–313, 391

cubes.cpp, 390

cumulative totals, calculating, 1320

Customer class, 690–691, 694

cv-qualifiers, 472–473

const, 473–474

volatile, 473

c_in_str() function, 340–341

c_str() method, 1252

D

data hiding, 511–513, 523

data methods, 1251–1253

data objects, pointers, 161

data types, 507–508

ADTs (abstract data types), 552–557

aliases, creating, 230

bool, 90

classifying, 97

compound types, 116

double, 50

floating-point numbers, 92

advantages/disadvantages, 96–97

constants, 96

decimal-point notation, 92

double, 94–96

E notation, 92–93

float, 94–96

long double, 94–96

integers, 68

char, 80–89

choosing integer types, 76–77

climits header file, 71–73

constants, 78–80, 90–92

initializing, 73

int, 68–70

long, 68–70

short, 68–70

sizeof operator, 71–73

unsigned, 74–76

width of, 68

recognized by, 1093–1095

type casts, 606–612

type conversion, 606–612

applying automatically, 616–618

conversion functions, 612–616

friends, 618–621

implicit conversion, 609

type conversions, 102

conversion in arguments, 106

conversion in expressions, 105–106

conversion on assignment, 103–104

type casts, 107–109

data types, 140. See also compound types

Data() function, 820

data() method, 1251–1252

Dawes, Beman, 1205

dec manipulator, 1090–1091

dec manipulators, 1078–1079

decimal numbers, 1215

decimal points, trailing, 1083–1087, 1090

decision making, 253

declaration statements, 41–43

declaration-statement expressions, 202

declarations, 463

aliases, 1157

auto, 109, 1155

decltype, 1156

external, 143

return types, 1157

declarative region, 483

declaring

arrays, 116–119

arrays of objects, 546

classes, 509–513, 522

constructors, 525–526

function pointers, 362–363

example, 364

invoking functions with, 363–364

pointers, 155–159, 171

two-dimensional arrays, 244–246

unions, 149

variables, 41–43

static, 183

vector class, 591–592

decltype, 439

declarations, 1156

decorating names, 418

decrement operator (--), 207–208

pointers, 210–211

postfixing, 209–210

prefixing, 209–210

deep copying, 642–644

default arguments, 409–412

default class constructors, 527–528

default constructors, 638–639, 766–767

Перейти на страницу:

Все книги серии Developer's Library

Похожие книги