Re: C's pointer arithmetic (Was Re: Setting effective UID for a shell script)
On Thu, May 16, 2002 at 09:02:25AM +0200, Perceval Anichini wrote:
> When you write
> argv + 1, the compiler will understand : compute the address
> of argv, and add one time the size of the type which is pointed by argv.
> I remember to you that argv = argv + 1. Brackets are only syntactic
> sugar, which allows us not seeing we are dealing with pointer arithmetic.
This could hardly be more offtopic, but
argv  == *(argv + 1)
not (argv + 1). &(argv ), or argv + 2, would have been what the
original coder was trying to express.
To UNSUBSCRIBE, email to email@example.com
with a subject of "unsubscribe". Trouble? Contact firstname.lastname@example.org