title: Dynamic array of strings - C
body: <p>I have an array of strings defined like this:</p>
  
  <pre><code>char** arrNames;
  </code></pre>
  
  <p>Now I want to dynamically allocate a size to it.
  I have a function that receives the new size and the array above.
  It goes like this:</p>
  
  <pre><code>char** AddName(char** arrNames, int nNameCount)
  {
      char** arrTemp;
  
      arrTemp = new char[nNameCount];
      ...
      // And later I change the pointer of arrNames to arrTemp
  }
  </code></pre>
  
  <p>Now this obviously doesn't work. So what should I be doing instead?</p>
  
  <p>Thanks in advance.</p>