I've tried it and it is still the same .... Idon't think this is the problem
since the static string is allowed...
Regards,
Tan Kuan Eeik
[EMAIL PROTECTED]
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Peter
> Sent: Tuesday, July 03, 2001 12:32 PM
> To: Palm Developer Forum
> Subject: Re: String error : just read directly from
> unallocated chunk of
> memory.
>
>
> Hi ,
> Before u use a Char* variable, first allocate memory for
> the variable using MemHandleNew and store the value into ur variable
> using StrCpy command.
>
> -Peter
>
> Richard Burmeister wrote:
>
> > > From: Tan Kuan Eeik
> > >
> > > Any idea y does this happen ? How do we manipulate String
> in palm...?
> > >
> >
> > See the String Manager section of the docs to learn about the string
> > manipulation functions provided by the Palm OS.
> >
> > > Char *phtxt, *ptxt;
> > >
> > > ptxt = "123456789";
> > > ...
> >
> > I didn't bother to read the rest of your code after seeing
> this. When you
> > declare "Char * ptxt" you are telling the compiler to
> allocate a pointer to
> > a Char. You haven't allocated any space to store
> "123456789". This is a C
> > programming error and has nothing to do with Palm
> programming. You should
> > get a book on C programming to learn how to do this. (And
> look at the
> > Memory manager section of the Palm OS docs.)
> >
> > Good luck.
> >
> > --
> > For information on using the Palm Developer Forums, or to
> unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
>
>
> --
> For information on using the Palm Developer Forums, or to
> unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/