Essential C++

Free Download

Authors:

Edition: 1

Series: C++ in-depth series

ISBN: 0201485184, 9780201485189

Size: 669 kB (684776 bytes)

Pages: 251/251

File format:

Language:

Publishing Year:

Category:

Stanley B. Lippman0201485184, 9780201485189

Readers can pick up this book and become familiar with C++ in a short time. Stan has taken a very broad and complicated topic and reduced it to the essentials that budding C++ programmers need to know to write real programs. His case study is effective and provides a familiar thread throughout the book.

Table of contents :
errata.pdf……Page 0
Table of Content……Page 2
Copyright……Page 5
Preface……Page 6
Structure of This Book……Page 7
Acknowledgments……Page 8
Typographical Conventions……Page 9
1.1 How to Write a C++ Program……Page 10
Exercise 1.2……Page 14
1.2 Defining and Initializing a Data Object……Page 15
1.3 Writing Expressions……Page 18
Operator Precedence……Page 21
Conditional Statements……Page 22
Loop Statements……Page 26
1.5 How to Use Arrays and Vectors……Page 28
1.6 Pointers Allow for Flexibility……Page 32
1.7 Writing and Reading Files……Page 35
Exercise 1.8……Page 38
2.1 How to Write a Function……Page 39
2.2 Invoking a Function……Page 44
Pass by Reference Semantics……Page 48
Scope and Extent……Page 50
Dynamic Memory Management……Page 51
2.3 Providing Default Parameter Values……Page 52
2.4 Using Local Static Objects……Page 54
2.5 Declaring a Function Inline……Page 56
2.6 Providing Overloaded Functions……Page 57
2.7 Defining and Using Template Functions……Page 58
2.8 Pointers to Functions Add Flexibility……Page 61
2.9 Setting Up a Header File……Page 63
Exercise 2.2……Page 64
2.6 Exercise 2.6……Page 65
3.1 The Arithmetic of Pointers……Page 66
3.2 Making Sense of Iterators……Page 71
3.3 Operations Common to All Containers……Page 74
3.4 Using the Sequential Containers……Page 75
3.5 Using the Generic Algorithms……Page 78
3.6 How to Design a Generic Algorithm……Page 80
Function Objects……Page 82
Function Object Adapters……Page 83
3.7 Using a Map……Page 86
3.8 Using a Set……Page 87
3.9 How to Use Iterator Inserters……Page 89
3.10 Using the iostream Iterators……Page 90
Exercise 3.4……Page 93
Chapter 4. Object-Based Programming……Page 94
4.1 How to Implement a Class……Page 95
Exercise 4.2……Page 97
4.2 What Are Class Constructors and the Class Destructor?……Page 98
The Member Initialization List……Page 100
Memberwise Initialization……Page 102
4.3 What Are mutable and const?……Page 103
Mutable Data Member……Page 105
4.4 What Is the this Pointer?……Page 106
4.5 Static Class Members……Page 108
Static Member Functions……Page 109
4.6 Building an Iterator Class……Page 111
Nested Types……Page 114
4.7 Collaboration Sometimes Requires Friendship……Page 115
4.8 Implementing a Copy Assignment Operator……Page 117
4.9 Implementing a Function Object……Page 118
4.10 Providing Class Instances of the iostream Operators……Page 120
4.11 Pointers to Class Member Functions……Page 121
Exercise 4.5……Page 125
Figure 5.1. Portion of Library Lending Material Class Hierarchy……Page 126
5.2 A Tour of Object-Oriented Programming……Page 128
5.3 Polymorphism without Inheritance……Page 132
5.4 Defining an Abstract Base Class……Page 134
5.5 Defining a Derived Class……Page 137
5.6 Using an Inheritance Hierarchy……Page 142
5.7 How Abstract Should a Base Class Be?……Page 144
5.8 Initialization, Destruction, and Copy……Page 145
5.9 Defining a Derived Class Virtual Function……Page 147
Static Resolution of a Virtual Function……Page 149
5.10 Run-Time Type Identification……Page 150
Exercise 5.4……Page 152
Chapter 6. Programming with Templates……Page 153
6.1 Parameterized Types……Page 154
6.2 The Template Class Definition……Page 156
6.3 Handling Template Type Parameters……Page 157
6.4 Implementing the Template Class……Page 159
6.5 A Function Template Output Operator……Page 164
6.6 Constant Expressions and Default Parameters……Page 165
6.7 Template Parameters as Strategy……Page 169
6.8 Member Template Functions……Page 170
Exercise 6.2……Page 172
7.1 Throwing an Exception……Page 173
7.2 Catching an Exception……Page 174
7.3 Trying for an Exception……Page 176
7.4 Local Resource Management……Page 179
7.5 The Standard Exceptions……Page 181
Exercise 7.2……Page 183
Exercise 7.3……Page 184
Exercise 1.4……Page 185
Exercise 1.5……Page 186
Exercise 1.6……Page 188
Exercise 1.7……Page 189
Exercise 1.8……Page 190
Exercise 2.1……Page 191
Exercise 2.2……Page 192
Exercise 2.3……Page 193
Exercise 2.4……Page 194
Exercise 2.5……Page 195
Exercise 2.6……Page 196
Exercise 3.1……Page 197
Exercise 3.2……Page 199
Exercise 3.3……Page 200
Exercise 3.4……Page 203
Exercise 4.1……Page 205
Exercise 4.2……Page 206
Exercise 4.3……Page 207
Exercise 4.4……Page 208
Exercise 4.5……Page 211
Exercise 5.1……Page 214
Exercise 5.2……Page 217
Exercise 5.3……Page 218
Exercise 6.1……Page 219
Exercise 6.2……Page 221
Exercise 7.1……Page 225
7.2 Exercise 7.2……Page 226
7.3 Exercise 7.3……Page 227
Appendix B. Generic Algorithms Handbook……Page 229
binary_search()……Page 230
equal()……Page 231
find_end()……Page 232
generate()……Page 233
inner_product()……Page 234
lexicographical_compare()……Page 235
merge()……Page 236
partial_sort(), partial_sort_copy()……Page 237
random_shuffle()……Page 238
remove_if(), remove_copy_if()……Page 239
rotate(), rotate_copy()……Page 240
search_n()……Page 241
set_union()……Page 242
transform()……Page 243
unique(), unique_copy()……Page 244
0.3 Chapter 2: Procedural Programming……Page 245
0.5 Chapter 4: Object-Based Programming……Page 246
0.6 Chapter 5: Object-Oriented Programming……Page 248
0.7 Chapter 6: Programming with Templates……Page 249
0.9 Appendix A: Exercise Solutions……Page 250
0.10 Appendix B: Generic Algorithms Handbook……Page 251

Reviews

There are no reviews yet.

Be the first to review “Essential C++”
Shopping Cart
Scroll to Top