Is there any possible way to display the date and time that my program was executed?
Is there any possible way to display the date and time that my program was executed?
Code:#include <stdio.h> #include <time.h> int main(void) { time_t now = time(NULL); puts(asctime(localtime(&now))); /* [edit] puts(ctime(&now)); [/edit] */ return 0; }
Last edited by Dave_Sinkula; 09-08-2003 at 11:45 AM.
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*
if you want to save it for later you can always trow it down in a file aswell.
They say that if you play a Windows Install CD backwords, you hear satanic messages. That's nothing; play it forward and it installs Windows.