< Previous | Contents | Next >
D
dangling pointers, 241, 250–251,
accessing, 259–260
container, 291–292
declaring and defining copy constructors, 309–313
declaring and defining destructors, 308–309
declaring data members that point to values on heap, 307–308
Heap Data Member program, 303–307
overloading assignment operator, 313–315
Deck class, BlackJack, 357, 360,
Deck m_Deck member, BlackJack
Game class, 360 declaring
destructors, 308–309
iterators, 125–126
static data members, 272 static member functions, 273 variables, 19–20, 165
deep copy, 310, 326 default arguments, 171–174, 184
assigning to parameters, 173–174
Give Me a Number program, 171–172
default assignment operator, 313, 326
default constructor, 262–263, 284
default copy constructor, 309, 326
default keyword, 77
default statement, 51
defining
accessor member functions, 267–268
constant member functions, 268–269
destructors, 308–309
member functions, 258–259, 282 new names for types, 23
new types, 255–260 accessing data members,
declaring data members, 258 declaring member
defining member functions, 258–259
instatiating objects, 259 Simple Critter program,
static member functions, 273 variables inside switch
delete operator, 300–301, 325 deque STL container, 139 dereference operator (*), 128, 146,
dereferencing
from base classes, 335–336 deriving from abstract classes,
instantiating objects from, 336–337
using access modifiers when deriving, 340
using base class pointers to objects, 350–351
using overloaded assignment operators and copy constructors in, 346–347
Designers Network Program, 62–65
declaring, 308–309
instantiating objects from derived class, 336
when to make virtual, 381 Die Roller program, 68–69 display() function
constant referencees and, 197 passing and returning arrays,
displayBoard()function,
logical NOT operator, 66 overview, 57–58
dot operator, 230 double type, 18, 19tbl double-ended queue, 148
dynamic array, 116 dynamic memory
allocating, 296–303
avoiding memory leaks, 301– 303
new operator, 299–300 data members and heap,
declaring, 307–308
destructors, 308–309 Heap Data Member
program, 303–307 overloading assignment op-