[Solved] A short C++ program about the pointer
An array of arrays like yours look like this in memory +———+———+———+———+———+———+ | x[0][0] | x[0][1] | x[0][2] | x[1][0] | x[1][1] | x[1][2] | +———+———+———+———+———+———+ The location of x, x[0] and x[0][0] is all the same. Also, arrays naturally decays to pointers to their first element. If you use plain x you will get … Read more