time类函数总结举例.docVIP

  • 3
  • 0
  • 约3.58千字
  • 约 6页
  • 2017-06-01 发布于河南
  • 举报
time类函数总结举例

头文件time.h? @函数名称: ? ? localtime? 函数原型: ? ? struct tm *localtime(const time_t *timer)? 函数功能: ? ? 返回一个以tm结构表达的机器时间信息? 函数返回: ? ? 以tm结构表达的时间,结构tm定义如下:? [cpp]?view plaincopy struct??tm{?? ???????int?tm_sec;?? ???????int?tm_min;?? ???????int?tm_hour;?? ???????int?tm_mday;?? ???????int?tm_mon;?? ???????int?tm_year;?? ???????int?tm_wday;?? ???????int?tm_yday;?? ???????int?tm_isdst;?? ?????};??? 参数说明: ? ? timer-使用time()函数获得的机器时间? [cpp]?view plaincopy #include?time.h??? #include?stdio.h??? #include?dos.h??? int?main()?{?? ?????time_t?timer;?? ?????struct?tm?*tblock;?? ?????timer=time(NULL);?? ?????tbloc

文档评论(0)

1亿VIP精品文档

相关文档