When I compile this I get about 200 lines of compiler errors using MINGW32..I tried to pipe it to a text file using > but no go. But is now calling errors on MINGW32 files.
This code is from this SO Post
and an explanation of the code can be found at this SO Post.
using namespace std;
template <typename Container> ostream& operator<<(ostream& os, const Container& c)
{
copy(c.begin(), c.end(), ostream_iterator<typename Container::value_type>(os, " "));
return os;
}