Original Post
Hey there. I'm trying to overload the square brackets, [], in a template function. Lets say, the container looks like this: container<class T> X { private: T *Data; }; assuming Data points to a dynamically allocated array, How would I correctly overload the square brackets, for template X, so that the following piece of code would assign the value 10 to elemenent 5 of Test, which is of type X: Test[5] = 10;