BrassPlus class objects, 732–733

constructors, 742

dynamic binding, 737–740

pointer compatibility, 737–739

reference type compatibility, 737–739

static binding, 737, 740

virtual destructors, 737, 742–743, 776

virtual functions, 739–742, 775–776

behavior, 734–736

friends, 743, 776

memory and execution speed, 742

redefinition, 743–745

virtual function tables, 740

pop() method, 837

popping values off heap, 1314

pop_heap() function, 1305

portability of C++, 15–18

ANSI/ISO standard, 16

limitations, 16

postfixing, 209–210

potential scope, 483

pound sign (#), 234

pow() function, 53

precedence

comma operator, 217

logical operators, 269–270

precedence of operators, 1231

examples, 1234

table of, 1232–1234

precise.cpp, 1082

precision() function, 1082–1083

precision() method, 408

predefined functors, 1030–1032

equivalents for operators, 1032

predicates

adaptable, 1035

binary, 1027–1030

adaptable, 1035

unary, 1027, 1030

prefixing, 209–210

preprocessors, 33–34

prev_permutation() function, 1319

print() functions, 413

printf() function, 29, 44

priority_queue class templates, 1017–1018

priority_queue containers, 1017–1018

private inheritance, 797

base-class components, initializing, 798–799

base-class friends, accessing, 801–804

base-class methods, accessing, 800–801

base-class objects, accessing, 801

compared to containment, 806

Student class example, 798, 804–805

private keyword, 511–513, 798

private member functions, 513

probability() function, 318–320

problem domains, 1207

procedural languages, 11–12

procedural programming, 506–507

procedures. See functions

programming

concurrent programming, 1202–1203

low-level programming, 1203–1204

programming, generic, 992

associative containers, 1018–1026

multimap, 1023–1025

set, 1019–1022

container concepts, 1007–1012

container methods compared to functions, 1039–1041

properties, 1008–1009

sequence requirements, 1011–1012

container types, 1013, 1017–1018

deque, 1013

list, 1014–1017

priority_queue, 1017–1018

queue, 1017

stack, 1018

vector, 1012–1013

iterators, 992, 997–1005

back insert iterators, 1005–1007

bidirectional iterators, 998

concepts, 1000

copy() function, 1001–1002

forward iterators, 998

front insert iterators, 1005–1007

hierarchy, 999–1000

importance of, 992–996

input iterators, 997–998

insert iterators, 1005–1007

istream iterator template, 1003

models, 1001

ostream iterator template, 1002

output iterators, 998

pointers, 1001

random access iterators, 999

reverse iterators, 1003–1005

types, 997

programming exercises

chapter 2, 62–63

chapter 3, 111–113

chapter 4, 192–193

chapter 5, 251–252

chapter 6, 301–303

chapter 7, 374–377

chapter 8, 444–446

chapter 9, 501–503

chapter 10, 559–562

chapter 11, 623–624

chapter 12, 702–705

chapter 13, 780–783

chapter 14, 871–876

chapter 15, 949

chapter 16, 1057–1058

chapter 17, 1148–1151

chapter 18, 1212–1213

programs

comments, 33

/*...*/ notation, 33

// notation, 32

creating main() function, 31

header filenames, 34

iostream file, 33–34

main() function, 29–30

calling, 30

importance of, 32

int main() header, 30–31

myfirst.cpp example, 27–29

comments, 32–33

header filenames, 34

iostream file, 33–34

main() function, 29–32

namespaces, 35–36

output, displaying with cout, 36–39

source code formatting, 39–40

namespaces, 35–36

output, displaying with cout, 36

concatenated output, 46–47

endl notation, 37–38

integer values, 44–45

\n newline character, 38–39

source code formatting, 39

tokens, 39–40

white space, 39

properties

algorithms, 1036–1037

class member functions, 777–778

containers, 1008–1010

reference variables, 390–391

protected classes, 745–746, 775

protected inheritance, 806–807

protected keyword, 745–746, 775, 806

protos.cpp, 310

prototypes (functions), 50–52, 309–311

benefits, 312–313

C++ compared to ANSI C, 312

function prototypes, 1330

syntax, 311–312

pseudorandom numbers, 605

ptrstr.cpp, 174–175

public derivation, 711

public inheritance, 806, 808, 829. See also MI (multiple inheritance)

multiple inheritance, methods, 826

public inheritance (polymorphic), 722–723

base-class functions, 777

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

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

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