title: how to create files named with current time?
body: <p>I want to create a series of files under "log" directory which every file named based on execution time. And in each of these files, I want to store some log info for my program like the function prototype that acts,etc.
  Usually I use the hard way of fopen("log/***","a") which is not for this purpose.And I just write a timestamp function:</p>
  
  <pre><code>char* timeStamp(char* txt){
    char* rc;
    char timestamp[16];
    time_t rawtime = time(0);
    tm *now = localtime(&amp;rawtime);
  
    if(rawtime != -1) {
       strftime(timestamp,16,"%y%m%d_%H%M%S",now);
       rc = strcat(txt,timestamp);
    }
    return(rc);
  }
  </code></pre>
  
  <p>But I don't know what to do next. Please help me with this!</p>