Pointers and Dynamic Arrays
Administrative Matters
Homework Assignement
Answers
Pointers and (Dynamic) Memory
Pointer Variables
The Address Operator, &
Assignment with Pointers
Assignment with Pointers: a Quiz
Pointer Variable Assignment
Your Major
Dynamic Variables
Dynamic Memory Allocation and “new”
Another Example
Class objects as dynamic variables
Dynamic Arrays
Quiz
Quiz: Answer
The heap (free store) and memory allocation failure
Releasing Memory and “delete”
Value Parameters That Are Pointers
Example of Value Parameter That Is a Pointer
Array Parameters
Parameters That Are Arrays
Reference Parameters That Are Pointers
Demonstration Program for Dynamic Arrays
Const Pointers and Arrays
Dynamic Data Structures
Bag ADT with Dynamic Array
Invariant for Revised Bag ADT
Value Semantics
Email: mgv@cs.sc.edu
Home Page: www.cs.sc.edu/~mgv
Other information: