try putting this at the top

#pragma warning( disable : 4530 )

I know the STL is a little hippy about warnings sometimes.

But I can't see what you are doing wrong, make sure you use the code I provided. Could also be your compilator (or mine) which doesn't compile stuff the same way.