#include // so I don't have to do lo level io everywhere. #include // close, and in general #include //read #include //read #include //read #include // perror #include // for strlen #include using namespace std; const char * filename = "ArgLog.log"; const char NL = '\n'; int main(int argc, char * argv[]) { int fd; int pos, bytes; char i; // more on this open soon. fd = open(filename, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH ); if (-1 == fd) { perror("Open failed"); return -1; } // go to the end of the file pos = lseek(fd, 0,SEEK_END); if (-1 == pos) { perror("Seek to end failed"); return (-1); } for(i=1;i