so currently i have to write a program in c++ where i have to create a class "CMyMatrix" and i wanted to know if its possible to overload the operator: "[][]"(i think technically they are 2 operators?) im using a 2d vector and would like the operator to work the same way as it works if you create a 2d array.
class CMyMatrix {
private:
std::vector<std::vector<double>> matrix;
int row_M = 0;
int column_N = 0;
public:
double& operator[][](int M, int N) { return something };
};
thank you for any help in advance.