$\require{cancel}$
Using Dynamic Memory, A variable size array.
- Let's build a class to hold a dynamic array.
- This array should grow as needed.
- What methods will this array need?
- A constructor, everything needs a constructor.
- Access, let's overload the [] operator.
- Add items: PushBack
- Remove items: PopBack
- Information Size and Capacity.
- What data members will this class need?
- Something to hold the data
- the number of items the array can hold (capacity)
- The number of items the array actually holds (size).
- See ArrayT.h