title: char* buffer = new vs char buffer[] in C++
body: <pre><code>1. char* buffer = new char[size]
  2. char buffer[size]
  </code></pre>
  
  <p>I'm new to C++ and I see most places creating buffers using the first example. I know in the first method, the data in that part of memory can be passed on until manually deleted using <code>delete[]</code>. While using the second method, the buffer would have a lifetime depending on the scope. If I only plan on the buffer lasting through a particular function and I don't plan on passing it to anything else, does it matter which method I use?</p>