creating, 483–486

declarative region, 483

example, 492–496

namesp.cpp, 493–494

namesp.h, 493

usenmsp.cpp, 494–495

global, 484

guidelines, 496–497

nesting, 490–491

open, 485

potential scope, 483

std, 59

unnamed, 491–492

using declaration, 486–490

using directive, 487–490

using-declaration, 491

using-directive, 491

naming conventions, 60

header files, 34

source files, 20

symbolic names, 90–92

universal character names, 87–88

variables, 66–68

narrowing uniform initialization, 1154

navigating files, 133–1141

temporary files, 1141–1142

nested classes, 682, 889–891

access control, 892

scope, 891–892

templates, 892–896

nested loops, 244–249

nested structures, 682

nested.cpp, 247, 895–896

nesting namespaces, 490–491

new, 921

new operator, 180–182, 454, 476–479, 482, 668

bad_alloc exceptions, 921

constructors, 659–661, 677–678

dynamic arrays, 164–167

dynamic structures, 178–180

free store, 183

memory allocation, 160–162

placement new, 671–676

reference variables, 400

newline character (\n), 38–39

newstrct.cpp, 179–180

next_permutation() algorithm, 1039

next_permutation() function, 1306, 1319

noboolalpha manipulator, 1090

noexcept, C++11, 1248

non-const objects, returning references to, 663

non-member functions, 986–991

non-type arguents (arrays), 843–845

nonexpressions, for loops, 202

nonmodifying sequence operations, 1286

adjacent_find() function, 1287, 1290

count() function, 1287, 1291

count_if() function, 1287, 1291

equal() function, 1288, 1291–1292

find() function, 1287–1289

find_end() function, 1287–1290

find_first_of() function, 1287, 1290

find_if() function, 1287–1289

for_each() function, 1287–1289

mismatch() function, 1288, 1291

search() function, 1288, 1292–1293

search_n() function, 1288, 1293

noshowbase manipulator, 1090

noshowpoint manipulator, 1091

noshowpos manipulator, 1091

NOT operators, logical NOT (!), 267–269

alternative representations, 270

precedence, 269

not.cpp, 267–268

nouppercase manipulator, 1091

nth_element() function, 1304, 1308, 1315

null characters, 121

null pointers, 163

nullptr, 1158

number base display, 1078–1079

number-reading loops, 283–286

numbers, 1215

ASCII character set, table of, 1225–1229

Big Endian/Little Endian, 1218

binary numbers, 1217

hexadecimal equivalents, 1217–1218

decimal numbers, 1215

factorials, calculating, 203–205

floating-point numbers, 92

advantages/disadvantages, 96–97

constants, 96

decimal-point notation, 92

double data type, 94–96

E notation, 92–93

float data type, 94–96

long double data type, 94–96

harmonic mean, 896

hexadecimal numbers, 1216

binary equivalents, 1217–1218

integers, 68

bool, 90

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

number-reading loops, 283–286

octal numbers, 1215–1216

pointers, 160

pseudorandom numbers, 605

numeric operations, 1319–1320

accumulate() function, 1320

adjacent_difference() function, 1321–1322

inner_product() function, 1320–1321

partial_sum() function, 1321

numstr.cpp, 130

num_test.cpp, 198

n_chars() function, 314–317

O

object code, definition of, 18

object types, 47

Object-Oriented Analysis and Design, Second Edition, 1323

object-oriented programming. See OOP (object-oriented programming)

objects, 511, 786

arrays, 355, 546–549

declaring, 546

example, 547–549

fill function, 357

initializing, 546

as exceptions, 903–908

assignable, 1008

associating with files, 289

base-class objects, accessing, 801

cerr, 1067

cin, 1067, 1093–1095

cin.get() function, 235–237, 241–244

get() function, 128–130

getline() function, 126–127

loops, 234–235

operator overloading, 1095–1097

stream states, 1097–1102

class, 788

clog, 1067

contained objects

compared to private inheritance, 806

initializing, 791

interfaces, 792–795

copy constructable, 1008

cout, 1067–1069

concatenation, 1071–1072

field width display, 1080–1081

fill characters, 1081–1082

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

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

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