title: Declaring multidimensional floating or unsigned dynamic array in C++
body: <p>How can I initialize a floating or unsigned multidimensional dynamic array in C++?</p>
  
  <p>I tried the following and got a seg fault,</p>
  
  <pre><code>float **array = NULL:
  
  array = new float* [rows];
  for(unsigned int i = 0; i &lt; rows; ++i)
  {
      array[i] = new float [cols];
  }
  </code></pre>
  
  <p>Thanks in advance.</p>