title: C++ convert formatted string to a stream
body: <p>I'm using VS2008 C++.</p>
  
  <p>As I understand it there is no way to pass something like this in a C++ stream : (without using external libraries)</p>
  
  <pre><code>"number " &lt;&lt; i    &lt;------ when i is an integer.
  </code></pre>
  
  <p>So I was looking for a better way to do this, and I all I could come up with is create a string using :</p>
  
  <pre><code>char fullstring = new char[10];
  sprintf(fullString, "number %d", i);
  .... pass fullstring to the stream  .....
  delete[] fullString;
  </code></pre>
  
  <p>I know it's stupid, but is there a better way of doing this?</p>