CTime tm = CTime::GetCurrentTime();
CString str2;
str2.Format(_T("D:\\%d_%d_%d__%d_%d_%d.txt"),tm.GetYear(),tm.GetMonth(),tm.GetDay(),tm.GetHour(),tm.GetMinute(),tm.GetSecond());
AfxMessageBox(str2);
CFile file;
file.Open(str2,CFile::modeCreate |CFile::modeNoTruncate |CFile::modeWrite);
MFC 以当前的时间作为文件名保存文件
最新推荐文章于 2020-07-02 11:43:48 发布