VS2019输出系统当前时间
作者:互联网
#include <time.h> void TimeDisp(void) { time_t nowTime; nowTime = time(NULL); struct tm* sysTime = localtime(&nowTime); nowTime = time(NULL); sysTime = localtime(&nowTime); printf("系统时间:%d年%d月%d日%d时%d分%d秒\n", sysTime->tm_year + 1900, \ sysTime->tm_mon + 1, sysTime->tm_mday, sysTime->tm_hour, sysTime->tm_min, sysTime->tm_sec); }
标签:输出,VS2019,time,nowTime,tm,当前,sysTime,NULL,localtime 来源: https://www.cnblogs.com/1359787445QAQ/p/15313520.html