template <typename Type>
Array<Type>::Array(const Array<Type>& data) // copy constructor
{
m_size = data.m_size; // set m_size to the size of the data which should be copied
m_data = new Type[m_size]; // allocate memory on the heap for m_data to be copied from the new data array
for (int i = 0; i < m_size; ++i)
{
m_data[i] = data.m_data[i]; // copy each element one at a time
}
cout << "Copy called" << endl;
}