As you now know, from other answers, type a is not really equivalent to int** - it jsut splits into this (when it is returned / passed by value).
int (*b)[2] = a;
There are more C ++ features:
typedef std::array<std::array<int, 2>, 3> M23; void foo(M23& b) { b[1][1] = 1; } int main() { M23 a = {{1, 2}, {11, 12}, {21, 22}}; foo(a); M23 d = a; d[1][1] = 1; }
sehe source share