1 2 |
CTime tm = CTime::GetCurrentTime(); CString strTm = tm.Format("%Y/%m/%d %H:%M:%S: "); |
参考サイト
CTime Class
https://msdn.microsoft.com/en-us/library/78zb0ese.aspx
最近はウェブ系アプリ中心、あとWindowsアプリちょっと
1 2 |
CTime tm = CTime::GetCurrentTime(); CString strTm = tm.Format("%Y/%m/%d %H:%M:%S: "); |
CTime Class
https://msdn.microsoft.com/en-us/library/78zb0ese.aspx
1 2 3 4 5 6 7 8 |
CStdioFile file; if (!file.Open(GetLogFileName(), CFile::modeCreate|CFile::modeNoTruncate|CFile::modeWrite|CFile::typeText)) { // fatal } file.SeekToEnd(); file.WriteString(szLog); file.Close(); |
CStdioFile Class
https://msdn.microsoft.com/en-us/library/a499td6y.aspx