Overload Operator [] in C++
            template
            class MyArray{
                private:
                    T* arr;
                public:
                    MyArray(){
                        arr = new int[n];
                    }
                    ~MyArray(){
                        delete[] arr;
                    }
                    T& operator[](int index) {
                        return *(arr + index);
                    }
            };

            MyArray myarr;
            myarr[i]