search for books and compare prices
Tables of Contents for C++ for Java Programmers
Chapter/Section Title
Page #
Page Count
Preface
iii
 
Basic Philosophical Differences
1
10
The Language C
1
2
The Development of C++
3
2
The Legacy Problem
5
1
The Language Java
6
2
The Better Language
8
1
Further Reading
8
3
Test Your Understanding
9
2
Fundamental Data Types
11
16
Integers
11
5
Characters
13
1
Booleans
14
1
Bit Fields
15
1
Floating Point Values
16
1
Enumerated Values
17
1
The void Type
18
1
Arrays
18
1
Structures and Unions
19
1
Object Values
20
1
Functions
21
6
Order of Argument Evaluation
22
1
The Function main
22
1
Alternative main Entry Points
23
1
Test Your Understanding
23
4
Pointers and References
27
16
Java Pointers
27
1
Pointers on Pointers
28
2
The address-of Operator
30
1
Pointers to Simple Values
31
4
Pointers to Pointer
32
1
Pointers and const
32
1
void * Pointers
33
1
Pointers to Functions
34
1
Pointers to Structures
35
1
Pointers to Arrays
35
2
References
37
6
Pass by Reference Parameters
38
2
References as Results
40
1
Test Your Understanding
41
2
Memory Management
43
20
The Memory Model
44
1
Stack-Resident Memory Values
44
6
Lifetime Errors
45
2
Size Errors
47
3
Heap-Resident Memory Values
50
13
Encapsulating Memory Management
53
6
Reference Counts
59
3
Test Your Understanding
62
1
Class Definition
63
26
Obvious Similarities and Minor Differences
63
1
Separation of Class and Implementation
64
4
Interface and Implementation Files
65
1
The inline Directive
66
1
Prototypes
67
1
External Declarations
68
1
Forward References
68
2
Constructors and Initialization
70
8
Default and Copy Constructors
70
1
Initializers
71
3
Order of Initialization
74
2
Combining Constructors
76
2
The Orthodox Canonical Class Form
78
1
Visibility Modifiers
79
1
Inner Classes Versus Nested Classes
80
3
Static Initialization
83
3
Final Classes
86
3
Test Your Understanding
87
2
Polymorphism
89
20
Virtual and Nonvirtual Overriding
91
3
Impact of Virtual on Size
93
1
Obtaining Type Information from a Dynamic Value
93
1
Abstract Classes
94
1
Downcasting (Reverse Polymorphism)
95
4
Simulating the Dynamic Cast
97
2
Name Resolution
99
2
A Forest, Not a Tree
101
1
Virtual Destructors
101
1
Private Inheritance
102
2
Inheritance and Arrays
104
1
Overloading
105
4
Test Your Understanding
106
3
Operator Overloading
109
28
Overloaded Functions or Methods
110
2
The Simple Binary Operators
112
1
The Comparison Operators
113
1
The Increment and Decrement Operators
113
2
The Shift Operators
115
1
The Assignment Operator
116
3
The Compound Assignment Operators
119
1
The Subscript Operator
120
1
The Parenthesis Operator
121
1
The Address-of Operator
122
1
The Logical Connectives
123
1
The Comma Operator
124
1
The Arrow Operator
125
1
Pointers to Members and Pointers to Member Functions
126
1
Conversion Operators
126
1
Memory Management Operators
127
1
Disallowing Operations
128
1
Implicit Functions and Invocations
128
9
Implicitly Created Operations
129
2
Implicit Function Invocations
131
3
Test Your Understanding
134
3
Characters and Strings
137
10
Characters and Literals Strings
137
4
Character Literals and the cctype Library
137
1
String Literals
138
1
The cstring Library
139
2
Constant and Mutable Values
141
1
The string Data Type
142
1
Example Program---Split a Line into Words
143
4
Test Your Understanding
145
2
Templates and Containers
147
18
Template Classes
147
4
Template Methods
150
1
Template Functions
151
1
The Standard Template Library
152
13
Containers
152
4
Iterators
156
4
Generic Algorithms
160
1
Function Objects
161
2
Test Your Understanding
163
2
Input/Output
165
14
The stdio Library
165
4
Formatted Output
167
2
The Stream I/O Facility
169
6
Stream Input
173
1
String Streams
173
1
File Streams
174
1
An Example Program
175
4
Test Your Understanding
176
3
Exception Handling
179
16
Flags and Return Codes
179
2
The Assertion Library
181
1
The setjmp and longjmp Facility
182
2
Signals
184
1
Exception Handling
185
10
Exception Types
186
1
Rethrowing Exceptions
187
1
No finally Clause
188
1
References as Exceptions
189
1
Exception Class Clonability
190
1
No Need to Document Exceptions
190
2
Standard Exceptions
192
1
Test Your Understanding
193
2
Features Found Only in C++
195
16
Global Variables
195
1
The Preprocessor
196
2
typedef Statement
198
1
The const Keyword
199
2
Default Arguments
201
1
Friends
202
2
Name Spaces
204
1
Multiple Inheritance
205
4
goto Statement
209
2
Test Your Understanding
210
1
Features Found Only in Java
211
4
Wrapper Classes
211
1
Interfaces
212
1
Inline Classes
212
1
Threads
213
1
Reflection
214
1
Test Your Understanding
214
1
Case Study---Fractions
215
20
Classes
216
2
Interface and Implementation
217
1
Constructors
218
2
Behavior
220
9
Member Functions
220
1
Operators
221
3
Increment and Decrement
224
1
Functions
225
1
Member Function Operators
226
2
Conversion Operations
228
1
Input and Output Streams
229
6
Stream Input
231
1
Test Your Understanding
232
3
Case Study---Containers
235
10
Shortest Path Graph Problem
235
6
Shortest Path Algorithm
238
1
Developing the Data Structures
238
3
A Concordance
241
4
Test Your Understanding
244
1
Case Study---A Card Game
245
24
The Class Card
245
2
Data and View Classes
247
1
The Game
248
2
Card Piles---Inheritance in Action
250
12
The Default Card Pile
253
1
The Suit Piles
254
1
The Deck Pile
255
3
The Discard Pile
258
1
The Table Piles
259
3
Playing the Polymorphic Game
262
2
The Graphical User Interface
264
5
Test Your Understanding
268
1
Case Study---Combining Separate Classes
269
6
Test Your Understanding
273
2
Appendix A Include Files
275
6
A.1 Input and Output
275
1
A.2 Diagnostics
276
1
A.3 Strings
276
1
A.4 STL Containers
276
1
A.5 STL Utility Routines
277
1
A.6 Numeric Support
277
1
A.7 Run-Time Support
278
1
A.8 Miscellaneous
278
3
References
281
3
Index
284