From: "Damian Yerrick" Newsgroups: comp.os.msdos.djgpp Subject: Re: How do I access elements of a structure with pointers? Date: Mon, 11 Oct 1999 18:34:06 -0500 Organization: Rose-Hulman Institute of Technology Lines: 32 Message-ID: <7tts92$5k0$1@solomon.cs.rose-hulman.edu> References: <7ttpdq$97ag8$1 AT titan DOT xtra DOT co DOT nz> NNTP-Posting-Host: yerricde.laptop.rose-hulman.edu X-Trace: solomon.cs.rose-hulman.edu 939684962 5760 137.112.205.146 (11 Oct 1999 23:36:02 GMT) X-Complaints-To: news AT cs DOT rose-hulman DOT edu NNTP-Posting-Date: 11 Oct 1999 23:36:02 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Nicholas Parker wrote: > This seems a fundamental part of C, but alas I > don't know how to do this, arbitrary code follows: If you have C questions, the friendly folks at comp.lang.c would be glad to help. > ---------------------------------------- > typedef struct { > float re; > float im; > } complex; > > void main(void){ > complex nick[4]; > complex *parker; > parker=&nick[0]; > > *parker.re=3; // This line wrong should be parker->re = 3; > } > -------------------------------------------- -- You have been helped. Damian Yerrick http://come.to/yerrick