I have
template <class T>
class arrList: public linearList<T> {
public:
arrList() {}
arrList(const arrList<T>& List);
~arrList() {delete[] element; }
protected:
void indexCheck(int indx) const;
T* element;
int arrLength;
int listSize;
};
And the copy constructor is
template<class T>
inline arrList<T>::arrList(const arrList<T>& List) {
element = List.element;
arrLength = List.arrLength;
listSize = List.listSize;
}
But im not sure if this is correct for T* element, and also if I have to insert the void function in the copy constructor too. I am new to this, and I don't know a lot about it, so any kind of help will be appreciated.