VC2013中怎么获取到本机时间?
想在一个标签中实时更新出本机时间,但是用localtime 写不出来
求大神解答下 类似这种问题可以自行百度哦~
#include <stdio.h>
#include "time.h"
int main ()
{
time_t rawtime;
struct tm * timeinfo;
time ( &rawtime );
timeinfo = localtime ( &rawtime );
printf ( "\007The current date/time is: %s", asctime (timeinfo) );
return 0;
}
页:
[1]