How to add time stamp a text file?
Posted on 2003-02-24
I am trying add time stamp to a text file to prevent it over written.
The example below allow user to save to a same file called group.txt. but if 2 or more
user run the program the file group.txt will be over written. Is it a way to save
the group.txt more than one version using time stamp?
Here is the example:
myfile = fopen("/home2/user/tmp/group.txt", "w");
fprintf (myfile, "%s\n", "Testing..testing..testing");