Jon Stewart on 15 Aug 2003 17:53:41 -0000 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
[ALACPP] correction to ostream_iterator |
So I found the SGI docs online: http://www.sgi.com/tech/stl/ostream_iterator.html This is what you want Gavin, if, y'know, boost::lambda doesn't work out... ostream& operator<<(ostream& str, const vector<string>& rhs) { copy(rhs.begin(), rhs.end(), ostream_iterator<string>(rhs, "\n")); return str; } It definitely pays to browse through Josuttis. for_each and boost::bind are powerful, but they can be a kind of crutch, too. Jon -- Jon Stewart Advanced Los Angeles C++ stew1@xxxxxxxxxxx http://www.alacpp.org _______________________________________________ alacpp mailing list alacpp@xxxxxxxxxxx http://lists.ellipsis.cx/mailman/listinfo/alacpp