How to Overload operator[]() in a 2D Array

I’ve watched Mosh’s video on overloading the operator in a 1-dimensional array in his Ultimate C++ course. Now, I’m trying to overload the operator for a 2-dimensional array but can’t figure out how to do that. Can someone help me?

I figured out how to overload the operator in a 2D matrix represented by a vector of vectors of type double, which I used to construct a C++ program that multiplies two 2D matrices. If you are interested in obtaining the code for my program, visit my website at: .