ostream/istream iterators

How can they be classified as iterators?

http://en.wikipedia.org/wiki/Iterator

The Wikipedia definition says:

"In computer programming, an iterator is an object that enables a programmer to traverse a container."

So why are they classified as iterators cause they aren't really letting you traverse a container???

I tried to do some research but after 2 hours of pounding my head I came back to the forum. I am really confused now.

Can someone please help me!
To put it simply, the iterators are letting you traverse the stream as if it were a container.
Oh ok, that makes sense. I shall go with that for now. Thanks!
The cool thing about them is that they make input or output streams look like containers. That allows you to use the relevant standard algorithms to read/write them.
Thanks guys!
Topic archived. No new replies allowed.