首页 > 其他 > 详细

调用系统时间

时间:2017-05-20 00:57:53      阅读:549      评论:0      收藏:0      [点我收藏+]

VS中编译通过:

#include<stdio.h>
#include<stdlib.h>
#include<time.h>
int main()
{
    printf("This is a test!\n");
    time_t rawtime;
    rawtime = time(NULL);
    struct tm *systime = localtime(&rawtime);
    printf("Time is: %s", asctime(systime));
    system("pause");
}

调用系统时间

原文:http://www.cnblogs.com/stephjusky/p/6880680.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!