On 12/8/05, Allan Wind <[EMAIL PROTECTED]> wrote:
> On 2005-12-08T10:37:36-0800, Wilson Yeung wrote:
> > You're expected to cast your structure into an unsigned char *,
> > because in C/C++, the only portable way to represent a byte is with a
> > char/unsigned char.
>
> Off-topic, I suppose, but what is a portable representation of a byte?
> What does unsigned char pointer give you that a void pointer does not
> (other than support for legacy compilers)?

This shouldn't work on your compiler:

    void* p;
   sizeof(*p)

This should return 1:

   unsigned char* p;
   sizeof(*p)

Reply via email to