title: How to get the address of the std::vector buffer start most elegantly?
body: <p>I want to use std::vector for dynamically allocating memory. The scenario is:</p>
  
  <pre><code>int neededLength = computeLength(); // some logic here
  
  // this will allocate the buffer     
  std::vector&lt;TCHAR&gt; buffer( neededLength );
  
  // call a function that accepts TCHAR* and the number of elements
  callFunction( &amp;(buffer[0]), buffer.size() );
  </code></pre>
  
  <p>The code above works, but this <code>&amp;(buffer[0])</code> looks ugly. Is there a more elegant way to achieve the same?</p>