函数名: time
功 能: 取一天的时间
用 法: logn time(long *tloc);
程序例:
#include <time.h>
#include <stdio.h>
#include <dos.h>
int main(void)
{
time_t t;
t = time(NULL);
printf("The number of seconds since January 1, 1970 is %ld",t);
return 0;
}
long *tloc 是定义指向长型的指针变量,那t=time(NULL),这()为什么是NULL呢? 这是TIME是函数说明,但我还是看不明白TIME的用法!