Homework/HW01/MyArray.cc
MyArray::MyArray(int theSize)
{
    // initialize the object as empty
    array = NULL;
    size = 0;
    // then use the resize function to allocate the memory
    resize(theSize);
}
// Constructor with given size, can be used as default constructor.
Constructor with given size, can be used as default constructor.
Constructor with given size can be used as default constructor .
MyArray::MyArray(int theSize)
{
    array = NULL;
    size = 0;
    resize(theSize);
}
MyArray :: MyArray ( int theSize ) { array = NULL ; size = 0 ; resize ( theSize ) ; }
Constructor with given size, can be used as default constructor.
Constructor with given size can be used as default constructor .
// initialize the object as empty // then use the resize function to allocate the memory