Sergio Masci wrote: > > > > cost ship * p; > > is this cost actually const? > > You can read from but not write to a const location. > const meens constant, unchanging. Declaring a const > pointer meens that it points to something which must > not be changed. > > > > p=&ship1; > > > (*p).temperature=123; > > > the error message is same. The p pointer is const, but the &ship1 expression is the address of the ship1 variable. (*p).temperature=123; is point to the ship1.temperature varible. So the ship1.temperature=123; and (*p).temperature=123; is must be equal. When i read from work, when write not, this looks like a bug. udv Csaba -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads