Re: declaration of variable in for loop
- From: roberson@xxxxxxxxxxxxxxxxxx (Walter Roberson)
- Date: Thu, 31 Jan 2008 17:45:07 +0000 (UTC)
In article <slrnfq41su.1kq4.willem@xxxxxxxxxxxxxx>,
Willem <willem@xxxxxxxx> wrote:
santosh wrote:
) You probably want:
) printf("%d\t%p = %d\n", i, (void *)&k, k);
) The 'p' format specifier expects a void * value and the type of the
) value yielded by the address-of operator is "pointer to T" where T is
) the type of it's operand.
Aren't casts to and from (void *) automatic ?
No, not when passing a parameter to a function.
--
"I will speculate that [...] applications [...] could actually see a
performance boost for most users by going dual-core [...] because it
is running the adware and spyware that [...] are otherwise slowing
down the single CPU that user has today" -- Herb Sutter
.
- Follow-Ups:
- Re: declaration of variable in for loop
- From: Flash Gordon
- Re: declaration of variable in for loop
- References:
- declaration of variable in for loop
- From: poornimamprabhu
- Re: declaration of variable in for loop
- From: santosh
- Re: declaration of variable in for loop
- From: Willem
- declaration of variable in for loop
- Prev by Date: Re: declaration of variable in for loop
- Next by Date: Re: Quick check on signed promotion of bytes
- Previous by thread: Re: declaration of variable in for loop
- Next by thread: Re: declaration of variable in for loop
- Index(es):
Relevant Pages
|