#include #include #include #include using namespace std; using MyNumberT = short; int main(int argc, char * argv[]){ int fd{open("tmpfile", O_RDONLY | O_CREAT, S_IRUSR | S_IWUSR)}; if (fd == -1) { perror("\tError open:"); } char c; while(read(fd, &c, 1) > 0) { cout << c; } close(fd); return 0; }