Re: How to make Array of NSString
Re: How to make Array of NSString
- Subject: Re: How to make Array of NSString
- From: Kevin Wojniak <email@hidden>
- Date: Mon, 10 Nov 2003 12:44:31 -0800
NSArray *myStrings = [NSArray arrayWithObjects:@"text", @"blah",
@"something", nil];
It must end with nil. Or you can use
NSMutableArray *myStrings = [NSMutableArray array];
[myStrings addObject:@"text"]; // at index 0
[myStrings addObject:@"blah"]; // at index 1
NSLog([myStrings objectAtIndex:0]); // outputs text
-Kevin
On Nov 10, 2003, at 8:21 AM, Jay Rimalrick wrote:
How do you make an array of NSStrings?
I tried NSString myString[50];
however when I try
myString[0] = @"text";
I get a warning/error
Thanks in advance
Jay
________________________________________________________________
Sent via the WebMail system at 1st.net
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________
www.kainjow.com
aim: kainjow1
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.