PDA

View Full Version : logfile in c


alaios
07-13-2005, 07:40 PM
Hi.. I am trying to implement a logfile in c...
so i use the fprintf function that writes to a file...
I want to put the date time (with seconds) in each line in the logfile.. What's the appropriate function for this?
Thx

aman
07-14-2005, 03:41 AM
Check out the time functions in C, things such as asctime(), strftime(), etc...