Hello everyone, I have been trying to figure out how to write the current system time to a file. I came across this code:
The above code works just fine, but it prints to the screen. I was wondering how I would get ltime to print to a file. Any help would be appreciated. Thanks.Code:int main() { time_t ltime; ltime=time(NULL); printf("%s",asctime(localtime(<ime))); getchar(); }