Last time, we left off with the default constructor. Remember that it has no arguments, which is why it is also called non-parameterized constructor. Therefore, this time we’ll kick off with parameterized constructor, which takes in user’s initial values.
Array::Array(int num_elements)
{
allocate(this->A, num_elements);
this->na = 0;
this->capacity_a = num_elements;
}
Read more here!
Top comments (0)