On 2013-07-10 20:22, Ali Çehreli wrote:

And to be pedantic, length comes first:

struct Array (T)
{
     size_t length;
     T* ptr;
}

I thought "ptr" came first, that's the reason you could cast to the pointer type. Not that one should do that. Perhaps there's some compiler/runtime magic involved.

--
/Jacob Carlborg

Reply via email to