#include #include #include #include #include using namespace std; int main(int argc, char* argv[]) { char* file = argv[1]; int fd = open(file, O_RDONLY); if (fd == -1) { cerr << "open() failed with errno = " << errno << endl; exit(1); } cout << "Enter any character (and CF) to continue..." << endl; char c; cin >> c; int status = close(fd); if (status == -1) { cerr << "close() failed with errno = " << errno << endl; exit(1); } exit(0); }