nsarray - 2D array in the objective C -


I want to ask a question about Objective-C. I was asking how to declare 2D array in the objective is past and I get 2D array. However, I modify some code and try to display the contents of the array. I found that input is wrong, no one can help to pinpoint my mistake.

  // Program: A 1D array in the Convent 2D array and // element // element in the element / example / data array [0] = restore the first name, [1] = Last name , [2] = Tom, [3] = Chan, [4] = May, ... // I want to break the difference in the outside array, InterAsEnSSTING * temp; ExternalDataRay = [[NSMUTABELARROR] INIT]; InDataArere = [[NSMUTABELARROR] INIT]; For (Int i = 0; I & lt; [Data array count]; I ++) {temp = [Data object Objective: I]; [Inadetada array add object: temporary]; [Temp Release]; If (I% [title] counting == 0 & amp; i! = 0) {[Internal release]; InDataArere = [[NSMUTABELARROR] INIT]; [External Data Arrayed Object: InDadaArerere]; }} [Internal release]; NSMutableArray * tempArray; // For display (int i = 0; i & lt; [external data array count]; i ++) {tempArray = [External data array object object: I]; For (int j = 0; j and lt; [inadetta arte gates]; j ++) {nslog (@ "% @", [tempere objectattex: j]); }}  

This adds you to this 'internal data array', but then when Before you add it to an external data array, count it directly to release it:

  if (i% [titleArray count] == ​​0 & amp; i! = 0) {[innerDataArray release]; InDataArere = [[NSMUTABELARROR] INIT]; [External Data Arrayed Object: InDadaArerere]; }  

Should not it?

  if (i% [titleArray count] == ​​0 and amp; i! = 0) {[External Data Ad Object: InDirectoryArere]; [InDirectory release]; InDataArere = [[NSMUTABELARROR] INIT]; }  

Comments