The front_index is 0 and no elements are in the list yet, so the length_ is 0 too. Let’s start with the constructors, our array will have a default size of 10, the first constructor takes a size_t(unsigned integer or only positive integer numbers form 0 to 4294967296) that defines the capacity of the list, the default value will be 10.
#SEQUENTIAL STRUCTURES FREE#
This class definition will follow Rule of three C++ programming (destructor, copy constructor and copy assignment operator).Ībout the class, following the encapsulation concept, to create abstractions to the user, the class array_list have all data members private. I will explain later what each virtual function implementation does with the array_list class.