Download presentation
Presentation is loading. Please wait.
1
Review Chapter 10 PPT for full coverage.
Pointers & Arrays Review Chapter 10 PPT for full coverage.
2
Basics Physical memory & addressing Logical address & virtual memory
3
Memory alignment Word alignment Memory alloction: block size
4
Dynamic arrays: basic.cpp
Use of pointers Array copy Pointer arithmetic
5
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.
6
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.
7
first.cpp
8
firstSecond.cpp
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.