title: Copy vector<char> into char*
body: <p>I'm just studying C and C++ programming.</p>
  
  <p>I've searched and can't seem to find an answer that has a decent response. Of course using <code>&lt;string&gt;</code> is much easier but for this task I am REQUIRED to use only clib <code>&lt;string.h&gt;</code> functions; I'm also not allowed to use C++11 functions.</p>
  
  <p>I have the 2 variables below, and want to move the contents of <code>buffer</code> into <code>c</code>.</p>
  
  <pre><code>vector&lt;char&gt; buffer;
  char* c = "";
  </code></pre>
  
  <p>How can I do this easily?</p>
  
  <hr>
  
  <p>I have this so far but it obviously doesn't work, otherwise I wouldn't be here.</p>
  
  <pre><code>for (int b = 0; b &lt; buffer.size(); b++)
  {
      c += &amp;buffer[b];
  }
  </code></pre>