Re: How to make Array of NSString
Re: How to make Array of NSString
- Subject: Re: How to make Array of NSString
- From: Greg Titus <email@hidden>
- Date: Mon, 10 Nov 2003 10:09:52 -0800
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
That's because you want an array of pointers to NSStrings:
NSString *myString[50];
You can't ever have statically allocated Objective-C objects (that is,
you always need to declare variables as pointers to objects, not the
objects themselves).
Hope this helps,
- Greg
_______________________________________________
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.