I been searching for this but failed to find a proper solution. Is it possible to create an array for each object present in an array?Lets say I have an array 'fruits'
NSMutableArray *fruits=[[NSMutableArray alloc]init];
[fruits addObject:@"apple"];
[fruits addObject:@"banana"];
[fruits addObject:@"mango"];
Now there are three objects in my array. IS it possible to create an array for each of the object present in the array 'fruit'.
Can I do something like
for(int i=0;i<fruits.count;i++){
NSMutableArray *fruits_%d=[[NSMutableArray alloc]init];
}
I know it is a blunder. Is there any way I can do that?
Thanks in advance.
NSMutableArray *fruits_%d=[[NSMutableArray alloc]init];. If you want multiplefruitsarrays, make it an array of arrays.)