Review Chapter 10 PPT for full coverage. Pointers & Arrays Review Chapter 10 PPT for full coverage.
Basics Physical memory & addressing Logical address & virtual memory
Memory alignment Word alignment Memory alloction: block size
Dynamic arrays: basic.cpp Use of pointers Array copy Pointer arithmetic
Dynamic memory & classes If you allocate dynamic memory, clean up after use (new & delete mechanism). If you use new in constructor or in set methods, make sure destructor releases all the dynamic memory.
Array of objects Can be allocated with just one “new” After allocating memory, default constructor is invoked automatically for each object. When array is deleted, destructor is invoked for each object first.
first.cpp
firstSecond.cpp