> Dear All,
> I have written the following code:
>
> void StringSearch( char* Input, char* A, char* B )
> {
>   A = strstr( Input, "<" );
>   B = strstr( Input, ">" );
> }
>
> int main(int argc, char* argv[])
> {
>   char* CC = "<ABCDEF>";
>   char* AA = NULL;
>   char* BB = NULL;
>
>   StringSearch( CC, AA, BB );
>   return 0;
> }
>
> I have passed 2 chr pointer , AA  and BB, into the function StingSerach(),
> but after the running thr function, the value of AA and BB still not
changed
> and still pointting to Null. What should I do it I want to get back the
> value which has assigned in the StringSearch() function?

void StringSearch( char* Input, char** A, char** B )
{
  *A = strstr( Input, "<" );
  *B = strstr( Input, ">" );
}

int main(int argc, char* argv[])
{
  char* CC = "<ABCDEF>";
  char* AA = NULL;
  char* BB = NULL;

  StringSearch( CC, &AA, &BB );
  return 0;
}



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