Don't have a clue what's the problem, but others might find it helpful if we know exactly what the compiler said. A copy & paste of the entire output might be helpful On 5/6/05, Harold Hallikainen wrote: > I have an array of structures in ROM. I want a pointer in RAM to point to > that. The C manual that comes with MCC18 is a bit unclear on how to do > this. My array in ROM is defined as: > > struct SongChord > { > unsigned char beats; > unsigned int chord; > }; > > #pragma romdata song1=0xe000 > > struct SongChord rom const Song1Array[]={ > data goes here } > > I'm trying to define a pointer that points to it. Thus far, I define the > pointer like this: > > struct SongChord rom const *SongArray; // local pointer to a song > > I'm trying to initialize the pointer with this: > > SongArray=&Song1Array; > > and getting complaints from the compiler. > > My goal is to have SongArray be a pointer in RAM that points to the array > in ROM so I can do something like this: > > NumBeats=SongArray[3].beats; > > Pointers in C have always been tricky to me. Mixing RAM and ROM makes it > worse! > > Thanks for any help! > > Harold > > -- > FCC Rules Updated Daily at http://www.hallikainen.com > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist