diff --git a/LinkedList.h b/LinkedList.h index 742933a..99e95ae 100644 --- a/LinkedList.h +++ b/LinkedList.h @@ -44,6 +44,7 @@ class LinkedList{ public: LinkedList(); LinkedList(int sizeIndex, T _t); //initiate list size and default value + LinkedList(const LinkedList&) = delete; // copy constructor isn't supported virtual ~LinkedList(); /* @@ -104,8 +105,8 @@ class LinkedList{ // add support to array brakets [] operator inline T& operator[](int index); inline T& operator[](size_t& i) { return this->get(i); } - inline const T& operator[](const size_t& i) const { return this->get(i); } - + inline const T& operator[](const size_t& i) const { return this->get(i); } + LinkedList& operator=(const LinkedList& other) = delete; // copy operator isn't supported }; // Initialize LinkedList with false values