title: How can I store a float value in an NSArray?
body: <pre><code>for ( tempI = 0; tempI &lt; 10; tempI++ )  
  {
      tempJ = 1;
      NSArray *objectsForArray = [NSArray arrayWithObjects:@"array[tempI][tempJ]", @"array[tempI][tempJ+1]",  @"array[tempI][tempJ+2]", nil];
  }
  </code></pre>
  
  <p>Can I write the code as above. I need to store an float value <code>(array[][])</code> in <code>NSArray</code>.  Can I do it ?<br>
  My problem is, I have a matrix as  </p>
  
  <pre><code>1.0   0.4   0.3   0.5  
  2.0   0.4   0.5   0.5  
  3.0   4.3   4.9   0.5  
  </code></pre>
  
  <p>I need to retrieve values (0.4, 0.3, 0.5) using  1.0, 2.0 3.0 . How can I use NSDictionary for this?<br>
  Thank You  </p>
  
  <pre><code>for( tempI = 0; tempI &lt; 5; tempI++)
  {
          NSDictionary *dictionary[tempI] = [ [NSDictionary alloc] initWithObjects:@"array[tempI][tempI + 1]", @"array[tempI][tempI + 2]", @"array[tempI][tempI + 3]", @"array[tempI][tempI + 4]", @"array[tempI][tempI + 5]", nil];
  }
  </code></pre>
  
  <p>Can I write in this way ? Does Objective C accepts it ?  </p>
  
  <p>I am getting an error as  </p>
  
  <blockquote>
  <pre><code>error: variable-sized object may not be initialized
  </code></pre>
  </blockquote>