title: How to put a string inside a std::vector<char>?
body: <p>I have a vector of char that its all elements are initialized by '-' like this:</p>
  <pre><code> vector &lt;char&gt; vec (10, '-'); //vec = &quot;----------&quot;
  </code></pre>
  <p>consider we have two inputs: a string and an integer representing the starting index. for example:</p>
  <pre><code> string word = &quot;HELLO&quot;;
   int start = 3;
  </code></pre>
  <p>I Want to put <code>word</code> inside the vector <code>vec</code> starting from the index <code>start</code> so that after this operation, <code>vec</code> should be like this:</p>
  <pre><code> //vec = &quot;---HELLO--&quot;
  </code></pre>
  <p>How can I do this?</p>