On Mon, Mar 3, 2014 at 3:55 AM, Mark Lawrence <breamore...@yahoo.co.uk> wrote:
> On 02/03/2014 16:45, Grant Edwards wrote:
>>
>>
>> That's irrelevent.  The actual location of the memory containing the
>> struct object (static, stack, heap, shared) doesn't matter.  The
>> address of the first field in a struture object _is_ the address of
>> the structure object.
>>
>
> You say struture, I'll say structure, let's call the whole thing off :)

:)

Note that, technically, Grant is correct as long as you grant (heh)
that a structure may have an invisible member, the virtual function
table pointer. C++ only (I don't believe C has virtual functions - but
it may have grown them in one of the newer standards), so in C, all
members are public.

With an array, the array's pointer *is* the same as the pointer to its
first member, because adding zero to a pointer does nothing, and x <->
&x[0] <-> &(*(x+0)).

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to