Data Structures Using C++ 2E: Pointers and Array-Based Lists
Data Structures Using C++ 2E: Pointers and Array-Based Lists
Chapter 3
Pointers and Array-Based Lists
Objectives
• List
– Collection of elements of same type
• Length of a list
– Number of elements in the list
• Many operations may be performed on a list
• Store a list in the computer’s memory
– Using an array
• Template insertAt
• Copy constructor
– Called when object passed as a (value) parameter to
a function
– Called when object declared and initialized using the
value of another object of the same type
– Copies the data members of the actual object into the
corresponding data members of the formal parameter
and the object being created
• Inserting an element
• Removing an element