|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
ok thank you. So there is nothing like c++ STL vector in Obj-c?
On 5/23/07, julien ricard <email@hidden> wrote: > hi, > > I've got 2 questions about NSMutableArray: > > -how can I create a NSMutableArray initialized with (float) 0s > (without adding them 1 by 1)? > -after creating a NSMutableArray using NSMutableArray > *myArray=[[NSMutableArray alloc] initWithCapacity:100];, how can I set > the ith value? > > These are very basic questions, but reading the NSArray and > NSMutableArray didn't help...
Stepping back... NSMutableArray is meant to store objects and it doesn't support sparse arrays.
I have a feeling that a simple C array may work best for you.
float myArray[100] = {0};
-Shawn
_______________________________________________ Do not post admin requests to the list. They will be ignored. Objc-language mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
| References: | |
| >NSMutableArray newbie question (From: "julien ricard" <email@hidden>) | |
| >Re: NSMutableArray newbie question (From: "Shawn Erickson" <email@hidden>) |
| Home | Archives | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.