title: Dynamically allocating and setting to zero an array of floats
body: <p>How do I automatically set a dynamically allocated array of floats to zero(0.0) during allocation</p>
  
  <p>Is this OK</p>
  
  <pre><code>float* delay_line = new float[filter_len];
  
  //THIS
  memset(delay_line, 0.0, filter_len); //can I do this for a float??
  
  //OR THIS
  for (int i = 0; i &lt; filter_len; i++)
    delay_line[i] = 0.0;
  </code></pre>
  
  <p>Which is the most efficient way</p>
  
  <p>Thanks</p>