David Thompson <dave.thompson2@[EMAIL PROTECTED]
> writes:
> On Mon, 5 May 2008 11:39:39 -0700 (PDT), Tomás Ó hÉilidhe
> <toe@[EMAIL PROTECTED]
> wrote:
> <snip>
>> then when you write the name of [an] array on its own, what you have is
>> a pointer to the first element of the array, e.g.: <snip>
>> (There are three special cases in which this isn't so:
>> 1) When sizeof is applied to the array
>> 2) When the addressof operator is applied to the array
>> 3) ...I can't actually think of it off-hand, but I'm sure I'd know
>> it if I was presented with it.)
>>
> Standard C has only (those) two explicit. C++ adds typeid, and initing
> a reference (which includes passing to a reference parameter).
C has three cases, only two of which can apply to array names. The
third case (in which an expression of array type is not implicitly
converted to a pointer to the array's first element) is a string
literal used in an initializer to initialize an array object.
[snip]
--
Keith Thompson (The_Other_Keith) kst-u@[EMAIL PROTECTED]
<http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"


|