consider the following:
ostream_iterator<int> i(cout,"");
cout << setw(3);
copy(int_list.begin(),int_list.end(),i);
the problem is that the field width restriction is only active for the first
element of int_list. after the first element is copied to cout the stream
setw(3) no longer has any affect.
why? and how to use stream_iterators that don't modify the state of setw()?
ostream iterators are of no use to me unless they can be used to
enforce more complicated text formatting than the
ostream_iterator(ostream&,string) constructor provides for.
--
--
dual 2.8Ghz Xeon; 2GB RAM; 500GB ATA-133; nVidia powered
Linux 2.6.10; glibc-2.3.5; vendor neutral home-brewed installation
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----