Re: returning value in a function argument
Re: returning value in a function argument
- Subject: Re: returning value in a function argument
- From: Angelo Chen <email@hidden>
- Date: Wed, 17 May 2006 17:27:30 -0700 (PDT)
Thanks for the fast response, i tried NSMutableString,
not working too. my purpose is to return two NSString
from the function, using function result is not
enough, any other way to do this? thanks.
--- Andrew Bowman <email@hidden> wrote:
>
> On May 17, 2006, at 5:09 PM, Angelo Chen wrote:
>
> > Hi,
> >
> > How to return NSString in a function argument?
> > following code does not work:
> >
> > void getInfo(NSString *info)
> > {
> > info = @"my info";
> > }
> >
> > later in the code:
> >
> > NSString *info;
> > getInfo(info);
> >
> > but info has nothing
> >
> >
>
>
> Sounds like you'd be better off using an
> NSMutableString, check the
> Cocoa Foundation API. Any particular reason why you
> can just have
> getInfo return a new string, and use that?
>
> - Andrew Bowman
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden