Re: Translate into ObjectiveC
Re: Translate into ObjectiveC
- Subject: Re: Translate into ObjectiveC
- From: Jason Harris <email@hidden>
- Date: Thu, 10 Feb 2005 23:59:44 -0700
You'll need to do this manually. Something like this would work:
NSMutableArray *newArray = [NSMutableArray arrayWithCapacity:
listOfNames.size()];
std::list<std::string>::const_iterator thisString, endString =
listOfNames.end();
for ( thisString = listOfNames.begin(); thisString != endString;
++thisString )
[newArray addObject: [NSString stringWithUTF8String:
thisString->c_str()]];
Jason
On Feb 10, 2005, at 4:02 PM, Brian O'Brien wrote:
std::list<std::string> listOfNames;
This is a list of names in C++.
Whats the quickest way to pass this into an objective C method?
I assume it needs to be converted to an NSObject of some time... but
what?
TIA
_______________________________________________
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
_______________________________________________
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