我这样定义,
CTime time;
CString strDate;
strDate = time.Format("%d年%d月%d日",time.GetYEAR(),time.GetMonth(),time.GetDay());
AfxMessageBox(strDate);
可是输出的是1970年1月1日,怎么输出的不是系统时间,而且我的vs2010这时也不能调用getcurrenttime这个函数,因为没有,这个为什么,谢谢有时间的人告诉我一下。
time = CTime::GetCurrentTime();
先要获取时间。否则得到的是CTime的默认值