title: Copy length of characters from array to std::string
body: <p>I am trying to copy 5 characters from a character array into a <code>std::string</code></p>
  
  <pre><code>char name[] = "Sally Magee";
  std::string first;
  copy(name, name + 5, first.begin()); //from #include &lt;algorithm&gt;
  std::cout &lt;&lt; first.c_str();
  </code></pre>
  
  <p>However I get the string plus a whole bunch of unprintable characters that I do not want. Any ideas? Thanks.</p>