Matrix
class aggregates an Array
with the follow declaration:
Array < Array<T> * > _element;That is,
_element
is an Array
of
pointers to Array
.
Array
of
Arrays
. The declaration would change to
Array < Array<T> > _element;
Array( Array<T>& arr);does not use the
const
optimization. It is not
required, but is the best practice when the
method argument will not be modified within the method.
const
.
The declaration should be:
Array( const Array<T>& arr);