Vector Ranges in C++
<p>Another quick question here, I have this code:</p>

<pre><code>  string sa[6] = {
         "Fort Sumter", "Manassas", "Perryville",
         "Vicksburg", "Meridian", "Chancellorsville" };
  vector&lt;string&gt; svec(sa, sa+6);
  for (vector&lt;string&gt;::iterator iter = svec.begin(); iter != svec.end(); iter++)
  {
          std::cout &lt;&lt; *iter &lt;&lt; std::endl;
  }
</code></pre>

<p>Why is it that when I do svec(sa, sa+7), the code works but it prints out an empty line after the last word and when I do sa+8 instead it crashes? Because the string array is only 6 elements big, shouldn't it crash at sa+7 also?</p>

<p>Thanks.</p>
