<p>I am trying to use a stringstream object in VC++ (VStudio 2003) butI am getting an error when I use the overloaded &lt;&lt; operator to try and set some manipulators.  </p>

<p>I am trying the following:  </p>

<pre><code>int SomeInt = 1;  
stringstream StrStream;  
StrStream &lt;&lt; std::setw(2) &lt;&lt; SomeInt;  
</code></pre>

<p>This will not compile (error C2593: 'operator &lt;&lt;' is ambiguous).<br>
Does VStudio 2003 support using manipulators in this way?<br>
I know that I can just set the width directly on the stringstream object e.g. StrStream.width(2);<br>
I was wondering why the more usual method doesn't work?</p>

Are you sure you included all of the right headers? The following compiles for me in VS2003:
```
```
#include <iostream>
#include <sstream>
#include <iomanip>

int main()
{
   int SomeInt = 1;
   std::stringstream StrStream;
   StrStream << std::setw(2) << SomeInt;
   return 0;
}
```
```