iphone - Loop and changing variable -


I have a loop for that which stores this data in an array.

I like it essentially to have 15 different arrays populated, I have written some pseudo code below. Is it worth achieving?

 for  (int y = 1; y & lt; 16; y ++) {NSArray * array + y = item}  
< P>

I always have this question and always want that there was a way (such as variable variables of PHP), but I'm pretty sure No ... The only way to do this is to do this array array:

Suppose you want to assign a value for an element of an array:

  NSArray * arrays [15]; For (Int i = 0; I  

Of course, what you want NSNumber, I was using it as just an example ...

Hope you wanted the same you want

PS You can also use the arrayWithCapacity of NSMutableArray instead of using a C-style array, but whatever you want.

  NSMutableArray * arrays = [NSMutableArray arrayWithCapacity: 14]; For (int i = 0; i  

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -