> StrCopy(result, array);
Like, Jeremy said, did you allocate memory space for result? If you
didn't, result will have an arbitrary value (possibly 0), which might
very well cause a crash.
> array[length] = '\0';
If this is not the case, are you sure length has the right value?
Good luck,
Cas
Friday, November 07, 2003 6:38 PM
To: Palm Developer Forum
Subject: how to convert char array to CharPtr type
Hi all,
I was able to convert char array to CharPtr type in Code Warrior version
7.
However when I move to Code Warrior version 8, I got error. Here is the
code :
CharPtr result;
Ch
"Sol" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> Hi all,
>
> I was able to convert char array to CharPtr type in Code Warrior version
7.
> However when I move to Code Warrior version 8, I got error. Here is the
> code :
> CharPtr result;
> Char array[10];
> UInt1
PROTECTED] On Behalf Of Sol
Sent: Friday, November 07, 2003 6:38 PM
To: Palm Developer Forum
Subject: how to convert char array to CharPtr type
Hi all,
I was able to convert char array to CharPtr type in Code Warrior version
7.
However when I move to Code Warrior version 8, I got erro
Hi all,
I was able to convert char array to CharPtr type in Code Warrior version 7.
However when I move to Code Warrior version 8, I got error. Here is the
code :
CharPtr result;
Char array[10];
UInt16 length;
--After processing...
array[length] = '\0';
StrCopy(resul