title: How to redefine an array in one statement?
body: <p>One of my apps that I'm working on at the moment relies on a multi-dimensional array. So far, I've been using a static array that was defined once, in a style similar to:</p>
  
  <pre><code>float exampleArray[2][2] = {{1, 2},
                              {3, 4}};
  </code></pre>
  
  <p>However, I'd now like to redefine this array, and such arrays cannot be easily redefined. Unlike when I initialised the array, I'd have to redefine every element of this array separately, for example:</p>
  
  <pre><code>exampleArray[1][1] = 3;
  exampleArray[1][2] = 0.5;
  exampleArray[2][1] = 17;
  exampleArray[2][2] = 2;
  </code></pre>
  
  <p>Since I'm working on a 17x17 array, the idea of having to do this doesn't really appeal to me! (And I don't really want to keep each array in memory at once, so three arrays or a three-dimensional array isn't the right way to go about this)</p>
  
  <p><em>I've looked into using a dynamic array instead. Theoretically, using a dynamic array, even I couldn't change everything in one go, I could free the memory for the old array, and then allocate memory for the new array.</em></p>
  
  <p><em>However, I've not seen a way of defining a dynamic array in the style of the first example. Is there any easy way to define (or redefine) a dynamic array without directly manipulating one element at a time (i.e. in a similar fashion to my first example)?</em></p>
  
  <p><strong>EDIT:</strong> See the suggestions below for methods that doesn't require dynamic arrays. Thanks for the quick responses!</p>