In C++, I thought you could do "string times 2" = stringstring?
<p>I'm trying to figure out how to print a string several times.  I'm getting errors.  I just tried the line:</p>

<pre><code>cout&lt;&lt;"This is a string.  "*2;
</code></pre>

<p>I expected the output: "This is a string.  This is a string.", but I didn't get that.  Is there anything wrong with this line?  If not, here's the entire program:</p>

<pre><code>#include &lt;iostream&gt;
using namespace std;


int main()
{
  cout&lt;&lt;"This is a string.  "*2;

  cin.get();
  return 0;
}
</code></pre>

<p>My compiler isn't open because I am doing virus scans, so I can't give the error message.  But given the relative simplicity of this code for this website, I'm hoping someone will know if I am doing anything wrong by simply looking.</p>

<p>Thank you for your feedback.</p>
