#include #include #include #include "date.h" using namespace std; int main(int argc, char **argv) { ifstream ifs("/dev/null"); if (!ifs) { cerr << argv[0] << ": couldn't open /dev/null\n"; return EXIT_FAILURE; } cout << boolalpha; cout << ifs.eof() << "\n"; date d; ifs >> d; //reads nothing because it reaches end-of-file cout << ifs.eof() << "\n"; return EXIT_SUCCESS; }