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/

Reply via email to