"Invalid write to 0000859C" should tell you that 'p' is pointing to an improper memory location. What all the other people have been telling you is that "Char *p;" declares a pointer, but it doesn't point to anything until you make it point to something. It's like the following example;
int x, y, z; x = y + z; What is the value of 'x'? You don't know, because you didn't set y and z to anything. Same with your "Char *p;". You have a pointer, but it doesn't point to anything yet. If this is not clear, then you must study pointers and addresses. There are countless tutorials on the internet, and many good reference books. -----Original Message----- > > From: %%email.bounce%% [mailto:%%email.bounce%%] On Behalf Of Ryan Dorn > > Sent: Monday, January 07, 2008 8:15 PM > > To: Palm Developer Forum > > Subject: RE: unable to use StrPrintF() > > > > If you use this code: > > > > Char *p = (Char *)MemPtrNew(32); > > StrPrintF(p, "%d", num); > > MemPtrFree(p); > > > > Does it still crash? > > > > Also, if it does crash, are you absolutely sure that > > this is where it is happening? > > > > - Ryan > > > > > > -- > > [Jeff Loucks, Gig Harbor, WA, USA] > > > -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
