Re: best way of copy istream to ostream
- From: "Tom Widmer [VC++ MVP]" <tom_usenet@xxxxxxxxxxx>
- Date: Wed, 26 Apr 2006 15:15:18 +0100
Pete Becker wrote:
bg wrote:
hi all,
what the best (stl) way of copy input to output using ofstreams/ifstreams
Depends on what you mean by that "(stl)" constraint. If you mean Standard Template Library, then maybe:
copy(istream_iterator<unsigned char>(input), istream_iterator<unsigned char.(), ostream_iterator<unsigned char>(output, ""));
Don't you mean:
copy(
istreambuf_iterator<char>(input),
istreambuf_iterator<char>(),
ostreambuf_iterator<char>(output)
);
Tom
.
- Follow-Ups:
- Re: best way of copy istream to ostream
- From: Pete Becker
- Re: best way of copy istream to ostream
- References:
- best way of copy istream to ostream
- From: bg
- Re: best way of copy istream to ostream
- From: Pete Becker
- best way of copy istream to ostream
- Prev by Date: Re: best way of copy istream to ostream
- Next by Date: Re: best way of copy istream to ostream
- Previous by thread: Re: best way of copy istream to ostream
- Next by thread: Re: best way of copy istream to ostream
- Index(es):
Relevant Pages
|