Article View: gnu.gcc.help
Article #42615Re: difference between x->y and *(x.y)???
From: Steffen Ries
Date: Wed, 15 Nov 1995 00:00
Date: Wed, 15 Nov 1995 00:00
24 lines
1250 bytes
1250 bytes
In article <47u2jr$ie0@kadri.ut.ee>, Asko Seeba <asko@hapnik.ut.ee> wrote: >id.cc:54: base operand of `->' is not a pointer >id.cc:54: base operand of `->' is not a pointer > >ident is ID type. >If i wrote > > case STRING: return ( *( id.string_id ) != *( ident.id.string_id ) ); > >then compiler ate it :). To this point i thought that it is the same... but >now i start to think something else... but what? dunno... Can anyone explain >it? x->y means: access member `y' of the structure `x' points to. This is equivalent to `(*x).y'. *(x.y) means: access the memory the member `y' of the structure `x' points to. (This is equivalent to `*x.y') cu, Steffen -- steffen.ries@gondolin.camelot.de | .sig intentionally left blank steffen_ries@m4.maus.de |
Technical Details
Message-ID:
<DI3nAC.Bq@gondolin.camelot.de>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<47u2jr$ie0@kadri.ut.ee>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,5db05e0c31fa17a8 X-Google-Attributes: gid11318c,public From: str@gondolin.camelot.de (Steffen Ries) Subject: Re: difference between x->y and *(x.y)??? Date: 1995/11/15 Message-ID: <DI3nAC.Bq@gondolin.camelot.de> X-Deja-AN: 119446896 references: <47u2jr$ie0@kadri.ut.ee> organization: home content-type: text/plain; charset=ISO-8859-1 mime-version: 1.0 newsgroups: gnu.gcc.help