<p>I am modifying some code and came across a declaration that I am having trouble understanding:</p>

<pre><code>int *userMask[3][4] = {0};
</code></pre>

<p>What exactly is this pointing to?  Is it a matrix where every element is a pointer?  Or is it pointing to a matrix of size [3][4]?</p>

<p>Thanks</p>

<hr>

<p>I guess my question is how <code>userMask[2][maskElement][user]</code> can work when it is declared as <code>int</code>.  Wouldn't userMask have to be <code>int[]</code> for that to work properly?  I must not be understanding this right...</p>

<p>On a side note, thanks for your suggestion about cdecl Robert.  However, does anyone know how to use it in an XP command prompt?  All I can get is syntax error :(</p>

This is a two-dimensional array where each element is a pointer to an
```
int
```
, and all the pointers are initialised to zero.
In your follow-up, you show that the array is used like this:
```
```
if(userMask[2][maskElement][user] && blah)
    result = true;
```
```
In this case, each element in
```
userMask
```
should actually point to an array of
```
int
```
s. (An
```
int*
```
can point to a single
```
int
```
or an array of
```
int
```
s). To determine this, check the code that assigns values to
```
userMask
```
. For example, it is possible to write:
```
```
int userArray[2] = { 10, 20 };

userMask[0][0] = userArray; // userMask[0][0] points to the
                            // first element of userArray.
```
```
Then the following code indexes into
```
userArray
```
:
```
```
int value = userMask[0][0][1]; // sets value = userArray[1], giving 20.
```
```