Re: why use -> (not .) with pointers?
- From: Lawrence Kirby <lknews@xxxxxxxxxxxxxxx>
- Date: Thu, 30 Jun 2005 16:07:03 +0100
On Thu, 30 Jun 2005 07:14:37 -0700, Suman wrote:
>
>
> Richard Tobin wrote:
> [snip]
>>
>> I think the answer is just that they are different operations so C has
>> different names for them. a->b is equivalent to (*a).b.
> Don't you think that was what I meant, albeit in a roundabout way?
> You don't I'll assume for now :)
>
> <i_think_remotely_O(n)T(opic)>
> In any case, this fires my curiosity. What if we did have the _same_
> operator? Would the compiler not have to do extra work?
Not to any measurable degree. It has to validate the type of the left hand
operand either way.
Lawrence
.
- References:
- why use -> (not .) with pointers?
- From: Felix Kater
- Re: why use -> (not .) with pointers?
- From: Suman
- Re: why use -> (not .) with pointers?
- From: Richard Tobin
- Re: why use -> (not .) with pointers?
- From: Suman
- why use -> (not .) with pointers?
- Prev by Date: Re: why use -> (not .) with pointers?
- Next by Date: Re: "basic" pointer question
- Previous by thread: Re: why use -> (not .) with pointers?
- Next by thread: Re: why use -> (not .) with pointers?
- Index(es):
Relevant Pages
|