title: declare dynamic array in function
body: <p>in which cases should I use the keyword <strong>new</strong> to allocate array when the size is a variable? I am reading this code: <a href="https://github.com/Hawstein/cracking-the-coding-interview/blob/master/1.7.cpp" rel="nofollow">https://github.com/Hawstein/cracking-the-coding-interview/blob/master/1.7.cpp</a></p>
  
  <p>In the function <strong>zero()</strong>, why <strong>row[m]</strong> and <strong>col[n]</strong> declarations doesn't cause errors? The <strong>m</strong> and <strong>n</strong> are function variables. </p>
  
  <p>Thanks </p>