
www.Usenet.com
Group Index
Comp Thread Archive from Usenet.com
Re: Incrementing int passed by reference
- __From__: Hans-Bernhard Broeker
- __Subject__: Re: Incrementing int passed by reference
- __Date__: Wed, 26 Nov 2003 04:23:39 -0600
Ian Bell <[EMAIL PROTECTED]> wrote:
> I am passing the address of an int into a function. I want to increment the
> int. Code snippet
> void foo(int * pc)
> {
> *pc++;
> }
> pc does not get incremented.
> Is this a funny precedence thing with *?
Yes. I'll leave it as an exercise to you to find out how to fix up the
precedence. ;->
--
Hans-Bernhard Broeker ([EMAIL PROTECTED])
Even if all the snow were burnt, ashes would remain.
--
comp.lang.c.moderated - moderation address: [EMAIL PROTECTED]
- Incrementing int passed by reference,
Ian Bell
- Re: Incrementing int passed by reference,
Jack Klein
- Re: Incrementing int passed by reference,
Dave Neary
- Re: Incrementing int passed by reference,
Andy Sinclair
- Re: Incrementing int passed by reference,
Paolo Montegriffo
- Re: Incrementing int passed by reference,
Hans-Bernhard Broeker
- Re: Incrementing int passed by reference,
Francis Glassborow
- Re: Incrementing int passed by reference,
David Resnick
- Re: Incrementing int passed by reference,
Mark Gordon
- Re: Incrementing int passed by reference,
Dan Pop
- Re: Incrementing int passed by reference,
Ian Bell