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"); 
}
posted @ 2012-10-20 18:57  beanmoon  阅读(139)  评论(0编辑  收藏  举报