[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Accessing structures defined in ROM ?
From: |
Vincent Trouilliez |
Subject: |
Re: [avr-gcc-list] Accessing structures defined in ROM ? |
Date: |
Tue, 27 Sep 2005 09:40:43 +0200 |
> No. p->nb means "the field nb that's pointed to by p".
> Hence,
> p->nb = p->nb + 1
> will increment nb. It will not try (and fail) to increment its address.
>
> p->nb is equivelant to (*p).nb
Thanks Rich & David.
It's just that I find the use of pointers a bit inconsistent, the syntax
and operators change depending on whether you work on discrete data
types, or complex ones like structures or arrays, so I sometimes find
myself scratching my head when I have to use pointers on my custom data
types that mix all of these 3 types... hopefully I will get the hang of
it, with practise...
--
Vince