vc获取系统时间-c++获取系统日期

这时获得起始时间和结束时间,可以进行时间差运算typedef struct _SYSTEMTIME WORD wYearWORD wMonthWORD wDayOfWeekWORD wDayWORD wHourWORD wMinuteWORD wSecondWORD wMilliseconds SYSTEMTIME,PSYSTEMTIME;1使用CTime类 include quotafxhquotvoid main CString str 获取系统时间 CTime tm tm=CTimeGetCurrentTime str=tmFormatquot现在时间是%Y年%m月%d日%Xquot MessageBoxNULL,str,NULL,MB_O。

返回顶部