🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #42578

Re: difference between x->y and *(x.y)???

#42578
From: Hans Werner Strube
Date: Sat, 11 Nov 1995 00:00
26 lines
1212 bytes
Asko Seeba (asko@hapnik.ut.ee) wrote:
: If i wrote

:     case STRING: return ( id->string_id != ident.id->string_id );

: then compiler cried:

: 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?

id->string_id is not *(id.string_id) but (*id).string_id !

--

 Hans Werner Strube          strube@physik3.gwdg.de
 Drittes Physikalisches Institut,  Univ. Goettingen
 Buergerstr. 42-44,   D-37073 Goettingen,   Germany
Technical Details
Message-ID: <4829vk$6l1@gwdu19.gwdg.de>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <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: strube@physik3.gwdg.de (Hans Werner Strube)
Subject: Re: difference between x->y and *(x.y)???
Date: 1995/11/11
Message-ID: <4829vk$6l1@gwdu19.gwdg.de>
X-Deja-AN: 119149518
references: <47u2jr$ie0@kadri.ut.ee>
organization: Drittes Physikalisches Institut, Univ. Goettingen, Germany
newsgroups: gnu.gcc.help