exer4.13.c(undone)

#include "apue.h"
#include <sys/types.h>
#include <utime.h> 
 
int main(){
  struct utimbuf tbuf;
 
  // both type of tbuf.actime and time() is time_t,
  // but why can't this assignment happen?
  tbuf.actime = time();
  tbuf.modtime = time();
  if(utime("hello.c", &tbuf) < 0)
    err_sys("utime error for hello.c"); 
}

你可能感兴趣的:(undo)