> -----Original Message----- > From: Also-Antal Csaba [SMTP:antalcs@MAIL.MATAV.HU] > Sent: Wednesday, February 27, 2002 6:16 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [pic]:struct+pointer > > > no the pointer is not const, it is a pointer to a const. > > > > to get a const pointer you would write: > > > > ship * const p; > > I was thinking about it, you have right. But this code give me a linker > error, so thats all. > > main.obj:105:Fixup overflow in expression (loc 0x3EC (0x3EA+2), size 1, > value 0x190) (error) > main.obj:105:Fixup overflow in expression (loc 0x3EE (0x3EA+4), size 1, > value 0x1A8) (error) > main.obj:105:Fixup overflow in expression (loc 0x3F0 (0x3EA+6), size 1, > value 0x1C0) (error) > main.obj:105:Fixup overflow in expression (loc 0x3F2 (0x3EA+8), size 1, > value 0x110) (error) > main.obj:105:Fixup overflow in expression (loc 0x3F4 (0x3EA+10), size 1, > value 0x128) (error) > main.obj:105:Fixup overflow in expression (loc 0x3F6 (0x3EA+12), size 1, > value 0x140) (error) > main.obj:105:Fixup overflow in expression (loc 0x3F8 (0x3EA+14), size 1, > value 0x158) (error) > main.obj:105:Fixup overflow in expression (loc 0x3FA (0x3EA+16), size 1, > value 0x1D8) (error) > > udv > Csaba > This is caused by not declaring the pointer bank correctly. As your Ship variables are in bank3, you have to tel the compiler you want your pointer to access bank3. From you original example try: typedef struct { bank3 ship * const numb; }blokk; This is a major stumbling block when dealing with pointers in a banked architecture like the PICs. Note also that in your original example there will not be enough room in bank3 for 8 instances of your 'ship' structure. Regards Mike -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics