A45679. 日期输出
填空题
容易
知识点
题目描述
日期输出
参考答案
#include <atltime.h>
int _tmain(int argc, _TCHAR* argv[])
{
CTime t = CTime::GetCurrentTime();
long lDate = t.GetYear()*10000+t.GetMonth()*100+t.GetDay();
printf("%d\n",lDate); //如:20110701
return 0;
}
上一题
下一题