Thanks! That jump starts my usage of the structures. You have been
a geat help!
-Tony
--- In AVR-Chat@yahoogroups.com, Robert Adsett <subscriptions@a...>
wrote:
> At 08:18 PM 4/25/05 +0000, arhodes19044 wrote:
> >Oh yeah. I remember the pain of figuring when to use the > vs .
> >operators. pointer references or whatever. OUCH!!! Well, I will
> >go through it again.
>
> name->item is a pointer dereference (it's a two character operator)
> name.item is simply a non-pointer reference.
>
> Given
>
> struct sdf {
> int a;
> int b;
> } *ptr, non_ptr;
>
> You would use
>
> non_ptr.a = ptr->a;
>
> Or
>
> non_ptr.a = (*ptr).a;
>
> Both lines have the same meaning. It's not really an array/non-
array type
> of difference although it can show up in that context.
>
> Of course you should init the pointer to something valid first ;)
>
> Robert
>
> " 'Freedom' has no meaning of itself. There are always
restrictions, be
> they legal, genetic, or physical. If you don't believe me, try to
chew a
> radio signal. " -- Kelvin Throop, III
> http://www.aeolusdevelopment.com/Message
Re: need variables to be stored in EEPROM
2005-04-25 by arhodes19044
Attachments
- No local attachments were found for this message.