- overload operator++(): read stream, e.g. >>,
- then mark if the iterator is the end-of-file iterator e.g. istream_iterator
(), i.e., the default constructor acting like an end marker. This is done with overloading operator==()
- overload operator=(): i.e. if something assgns to ostream_iterator, it will output the value with <<. assuming the value can be used with << to output.
No comments:
Post a Comment