title: Converting between C++ std::vector and C array without copying
body: <p>I would like to be able to convert between std::vector and its underlying C array int* without explicitly copying the data. </p>
  
  <p>Does std::vector provide access to the underlying C array? I am looking for something like this </p>
  
  <pre><code>vector&lt;int&gt; v (4,100)
  int* pv = v.c_array();
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>Also, is it possible to do the converse, i.e. how would I initialize an <code>std::vector</code> from a C array without copying?</p>
  
  <pre><code>int pv[4] = { 4, 4, 4, 4};
  vector&lt;int&gt; v (pv);
  </code></pre>