Originally Posted by
kfuller002
Hello, I'm writing a c program for class and it's asking me to write the low-order 8 bits of the time to the disk file. We are supposed to use the time system call and then write it to a file.
Currently i have everything working doing this:
unsigned char c;
c = 0xae;
write(fd, &c, 1);
and to get the time I'm using: time_t time(time_t *timer);
my question is how do i save time to c?
something like: c = time; so i can write it to the file...
Any help would be great, thanks.