>Subject: problem with StrNCopy
>From: prasad <[EMAIL PROTECTED]>
>Date: Sat Feb 16 11:30:54  2002
>hello,
>       I am facing the problem with StrNCopy();
>
>please see this one.
>CharPtr recText = "thisisfromlaxma";
>CharPtr test = "fromlaxma";
>CharPtr test1;
>
>StrNCopy (test1,recText,StrLen(recText)-StrLen(test));
>
>any one have idea please tell me

Actually nothing wrong with StrNCopy, just poor coding on
your part.

Try changing
        CharPtr recText = "thisisfromlaxma";
        CharPtr test = "fromlaxma";
        CharPtr test1;
to be
        const Char * recText = "thisisfromlaxma";
        const Char * test= "fromlaxma";
        Char test1[40];
And it should be fine!

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/

Reply via email to