1. 程式人生 > >CTime類的標頭檔案以及輸出當前時間

CTime類的標頭檔案以及輸出當前時間

      
#include<iostream>
#include<atltime.h>
using namespace std;
int main()
{
	CTime time = CTime::GetCurrentTime();
	CString date = time.Format(_T("%Y-%m-%d %X"));
	wcout << date.GetString() << endl;
	system("pause");

}