>Subject: RE: char pointer intialization
>From: "ajitnk" <[EMAIL PROTECTED]>
>Date: Thu, 1 Mar 2001 11:05:36 +0530
>assign NULL value to the pointer after u allocate
>that should sove ur problem
I'd really recommend against this suggestion.
Char *ptr = (Char*)MemPtrNew(128);
ptr = NULL; // no, no, no!
Better to use:
Char *ptr = (Char*)MemPtrNew(128);
if (ptr == NULL) { ... // error handling}
else *ptr = '\0';
Roger Stringer
Marietta Systems, Inc.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/