| delorie.com/archives/browse.cgi | search |
| Date: | Wed, 17 Feb 1999 13:08:43 -0500 |
| Message-Id: | <199902171808.NAA16775@envy.delorie.com> |
| From: | DJ Delorie <dj AT delorie DOT com> |
| To: | djgpp AT delorie DOT com |
| In-reply-to: | <36CAFA2D.DEDDF0BF@castle.on.ca> (message from balboa on Wed, 17 |
| Feb 1999 12:19:41 -0500) | |
| Subject: | Re: Newbie looking for clarity |
| References: | <36CAFA2D DOT DEDDF0BF AT castle DOT on DOT ca> |
| Reply-To: | djgpp AT delorie DOT com |
> struct item
> {
> int value;
> char name[20];
> };
>
> struct item list;
>
> Is it the same for this structure, the name list points to the address
> of first element of the structure?
No. list *is* the structure. Arrays are different.
> If this is true then list.value is a pointer to the value.
No, list.value *is* the value.
Your array example would work if you had this instead:
struct item list[10];
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |