1 / 286
文档名称:

Algorithms Data Structures And Problem Solving With C++ [Addison Wesley].pdf

格式:pdf   页数:286
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

Algorithms Data Structures And Problem Solving With C++ [Addison Wesley].pdf

上传人:bolee65 2014/3/4 文件大小:0 KB

下载得到文件列表

Algorithms Data Structures And Problem Solving With C++ [Addison Wesley].pdf

文档介绍

文档介绍:List of Transparencies
Chapter 1 Pointers, Arrays, and Structures 1
Pointer illustration 2
Result of *Ptr=10 3
Uninitialized pointer 4
(a) Initial state; (b) Ptr1=Ptr2 starting from initial state; (c) *Ptr1=*Ptr2 starting from
initial state 5
Memory model for arrays (assumes 4 byte int); declaration is int A[3]; int i; 6
Some of the string routines in <> 7
Two ways to allocate arrays; one leaks memory 8
Memory reclamation 9
Array expansion: (a) starting point: A2 points at 10 integers; (b) after step 1: Original
points at the 10 integers; (c) after steps 2 and 3: A2 points at 12 integers, the first 10
of which are copied from Original; (d) after step 4: the 10 integers are freed 10
Pointer arithmetic: X=&A[3]; Y=X+4 11
First eight lines from prof for program 12
First eight lines from prof with highest optimization 12
Student structure 13
Illustration of a shallow copy in which only pointers are copied 14
Illustration of a simple linked list 15
Chapter 2 Objects and Classes 16
plete declaration of a MemoryCell class 17
MemoryCell members: Read and Write are accessible, but StoredValue is hidden
18
A simple test routine to show how MemoryCell objects are accessed 19
A more typical MemoryCell declaration in which interface and implementation are sepa-
rated 20
Interface for BitArray class 21
Copyright 1996 by Addison-Wesley pany ii
BitArray members 22
Construction examples 23
Chapter 3 Templates 24
Basic action of insertion sort (shaded part is sorted) 25
Closer look at action of insertion sort (dark shading indicates sorted area; light shading is where
new element was placed) 26
Typical layout for template interface and member functions 27
Chapter 4 Inheritance 28
General layout of public inheritance 29
Access rules that depend on what M ’s visibility is in the base class 30
Friendship is not inherited 31
Vector and BoundedVector classes with calls to operator[] that are done automatically
and correctly 32