<p>I'm pretty sure this is a simple question in regards to formatting but here's what I want to accomplish:</p>

<p>I want to output data onto the screen using <code>cout</code>.  I want to output this in the form of a table format.  What I mean by this is the columns and rows should be properly aligned.  Example:</p>

<pre><code>Test                 1
Test2                2
Iamlongverylongblah  2
Etc                  1
</code></pre>

<p>I am only concerned with the individual line so my line to output now (not working) is</p>

<p><code>cout &lt;&lt; var1 &lt;&lt; "\t\t" &lt;&lt; var2 &lt;&lt; endl;</code></p>

<p>Which gives me something like:</p>

<pre><code>Test                 1
Test2                  2
Iamlongverylongblah         2
Etc                  1
</code></pre>

I advise using
Boost Format
. Use something like this:
```
```
cout << format("%|1$30| %2%") % var1 % var2;
```
```