#include #include #include #include "date.h" #include "istream_iterator_date.h" using namespace std; int main(int argc, char **argv) { ifstream ifs("infile"); if (!ifs) { cerr << argv[0] << ": couldn't open infile\n"; return EXIT_FAILURE; } const istream_iterator_date end; for (istream_iterator_date it(ifs); it != end; ++it) { cout << *it << "\n"; } return EXIT_SUCCESS; }