#include #include #include //for istream_iterator #include "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 end; //end of input for (istream_iterator it(ifs); it != end; ++it) { cout << *it << "\n"; //cout << it.operator*() << "\n"; } return ifs.eof() ? EXIT_SUCCESS : EXIT_FAILURE; }