by "Default User" <defaultuserbr@[EMAIL PROTECTED]
>
May 7, 2008 at 05:04 PM
nembo kid wrote:
> I have the following bidimensional array
>
> int a [100][100];
I assume you mean "mat" here, to be consistent with what follows.
> Why the first address of this array is only:
>
> & (mat[0][0])
It's not. That's the first element of the first element.
> and not also:
>
> mat
That gives you the address of the first element. The first element is
an array of int of size 100.
> like any other array?
It is like any other array. You just don't understand how it works. The
name of the array in most cir***stances is converted to a pointer to
the first element. So "mat" is of type "pointer to array 100 of int",
and points to the beginning of mat[0].
I recommend reading over the FAQ entries on pointers and arrays.
Brian