How can I make the system call write() print to the screen?
For my OS class I'm supposed to implement Linux's cat using only system calls (no printf) Reading this reference I found it being used to print to a file. I guess I should manipulate ofstream. In the example appears: ofstream outfile ("new.txt",ofstream::binary); How can I make it write to the screen? EDIT: I realized this write() is part of iostream library, is this the same as the int write (int fd, char *buf , int size) system call? Write to the file descriptor for standard output or standard error (1 and 2 respectively). A system call is a service provided by Linux kernel. In C programming