I want to have access to multidimensional data inside a class, I found:
To provide multidimensional array access semantics, e.g. to implement a 3D array access a[i][j][k] = x;, operator[] has to return a reference to a 2D plane, which has to have its own operator[] which returns a reference to a 1D row, which has to have operator[] which returns a reference to the element. To avoid this complexity, some libraries opt for overloading operator() instead, so that 3D access expressions have the Fortran-like syntax a(i, j, k) = x;
on http://en.cppreference.com/w/cpp/language/operators
and I'd like to use suggested syntax, but I have trouble implementing that. How can I write overloaded assignment operator to work that way?