title: How can I repeat a string a variable number of times in C++?
body: <p>I want to insert 'n' spaces (or any string) at the beginning of a string in C++. Is there a direct way to do this using either std::strings or char* strings?</p>
  <p>E.g., in Python you could simply do</p>
  <pre><code>&gt;&gt;&gt; &quot;.&quot; * 5 + &quot;lolcat&quot;
  '.....lolcat'
  </code></pre>