Re: what is the suggested way to do void * arithmetic ?

From: Terry Lambert <tlambert2_at_mindspring.com>
Date: Fri, 11 Jul 2003 02:57:51 -0700
Luigi Rizzo wrote:
> > I don't understand the second one.  The first one blows up because
> > you aren't parenthesizing, e.g.:
> >
> >       next = (void *)(p + len);
> >
> > The compiler is complaining because it doesn't know sizeof(*((void *)0))
> 
> ok, it actually evaluates to 1 and i thought it was some standard, probably
> it is not so i guess i have to cast to (char *) instead

THat's what I meant -- "char *", not "char"; sorry for any confusion.

-- Terry
Received on Fri Jul 11 2003 - 01:02:10 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:14 UTC