If the array is a true array 2D array and not an array of pointers or something like that, then you can add/subtract to/from sign
to get other elements' addresses.
For example, memory-wise the previous element in the array is at sign - 1
. If you think of your 2D array as a grid, sign - 1
might not be the element in the previous "column".
You have to be careful how much you step in your array and ask yourself why you resort to such low-level dangerous mechanisms that feel out of place in C++.