title: How to use iomanip to make multiple out strings occupy a certain width together?
body: <p>I know setw(n) only works for the string that directly follows it. Like:</p>
  
  <pre><code>cout&lt;&lt;setw(10)&lt;&lt;"A"&lt;&lt;" String"&lt;&lt;endl;
  </code></pre>
  
  <p>Gives out this:</p>
  
  <pre><code>          A String
  </code></pre>
  
  <p>with 9 spaces before A.</p>
  
  <p>But I want some sort of command like this:</p>
  
  <pre><code>cout&lt;&lt;[something here to set the space for all coming things]&lt;&lt;"A"&lt;&lt;" String"&lt;&lt;endl;
  </code></pre>
  
  <p>To provide this:</p>
  
  <pre><code>    A String
  </code></pre>
  
  <p>With "A" and " String" uses 10 chars together, only 2 spaces before A.</p>
  
  <p>Is there a way to do that? Appreciate any help, thanks!</p>