My code "like" this, but not all program, just this function.
some time occur at two integer ...(^^|||)  god...

Char* myFunction( void)
{
    Char *str1;
    Char *str2;

    str1 = MemPtrNew( 13);
    StrCopy( str1, "Johnny Hsiao");  // str1 is full name
    str2 = MemPtrNew( 6);    // str2 and str1 occur change, like str1 = str2
    StrNCopy( str2, str1+7, 5);    // I want get last name and put str2 ,
but str1 was renew ...\

    return str2;
}



"Richard Burmeister" <[EMAIL PROTECTED]> ????? news:56015@palm-dev-forum...
>
> > From: I am johnny~
> >
> > In a function, I declare two char* ( str1,str2).
> > str1 is all data, other str2 need get some chars from str1.
> > I use MemPtrNew() renew str2 ( and renew str2's len)...
> > but str1 and str2 together changing ... what's going on ?
> >
>
> You might want to post the actual code you are using.  It sounds like you
> are actually assigning str1 = str2 or vice-versa.
>
>
>



-- 
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