> I declared the structure as a Global variable. It is the structure for the > database records. > > I try to load a string into one of the character arrays, and get an error > message > > telling me that I am accessing reserved Global memory incorrectly. > > ----- Original Message ----- > From: "Ben Combee" <[EMAIL PROTECTED]> > To: "Palm Developer Forum" <[email protected]> > Sent: Friday, November 04, 2005 1:02 PM > Subject: Re: I hate to ask > > > > At 11:44 AM 11/4/2005, you wrote: > > >I am trying to set the first character in a char array within a structure > > >equal to a character using: > > > > > >aRecord->Ground[0] = 'u'; > > > > > >When I run this, the compiler tells me that I'm accessing memory > > >incorrectly, and should use special means of accessing memory. > > > > This should work, unless aRecord is on the storage heap. In that case, > you > > need to write something like > > > > DmWrite(aRecord, offsetof(aRecord, Ground[0]), "u", 1); > > > > (that's approximate syntax) > >
In your code, what has aRecord been set to? Without seeing the code, it's hard to know what's going on, but aRecord needs to point to your global variable, or to storage of the appropriate type that's been allocated. -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
