title: vector string character replace in middle of string c++
body: <p>I am using this code to replace a letter in a string it works fine but it removes the first letter that i need to keep. I only need a * in the centre of the string but this problem has stumped me.</p>
  
  <pre><code>textWords[i].replace(pos, 2 , 1 , '*');
  </code></pre>
  
  <p>All the words i am replace the middle character in are three characters long and it always get rid of the first character as well. The replace function is the one used for vectors i did not write it and pos is defined by the code below.</p>
  
  <pre><code> size_t pos = textWords[i].find(bannedWords[j]);
  </code></pre>
  
  <p>Any help is appreciated.</p>