資源簡介
用MFC寫了一個簡單的記賬程序,主要邏輯通過對文件的讀寫完成,附上源碼,需要的人可以去研究一下。
代碼片段和文件信息
#include?“stdafx.h“
#include?“DateInfo.h“
#include?“sstream“
const?wchar_t*?gMonths[]?=?{
L“Jan“
L“Feb“
L“March“
L“Apr“
L“May“
L“June“
L“July“
L“Aug“
L“Sep“
L“Oct“
L“Nov“
L“Dec“
};
short?gDayLimit[]?=?
{
31?28?31
30?31?30
31?31?30
31?30?31
};
DateInfo::DateInfo(short?iDay?short?iMonth?short?iYear)
:mDay(iDay)?mMonth(iMonth)?mYear(iYear)
{
}
DateInfo::~DateInfo()
{
}
short?DateInfo::GetDay()
{
return?mDay;
}
short?DateInfo::GetMonth()
{
return?mMonth;
}
void?DateInfo::DateToFilenName(std::wstring?&iorFilenName)
{
iorFilenName.clear();
std::wstringstream?lString;
std::wstring?lYear?lMonth;
lString?< lString?>>?lYear;
lString.clear();
lString?< lString?>>?lMonth;
iorFilenName?=?lYear?+?L“-“?+?lMonth?+?L“.fkp“;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????36??2009-07-12?20:42??debug\2009-7.fkp
?????文件?????229376??2009-07-31?20:42??debug\Finance.exe
?????文件????3145728??2009-07-31?20:37??debug\Finance.exe_
?????文件????1338392??2009-07-31?20:42??debug\Finance.ilk
?????文件???12332032??2009-07-31?20:42??debug\Finance.pdb
?????目錄??????????0??2009-07-31?20:42??debug
?????文件????????866??2009-07-19?11:59??Finance\DateInfo.cpp
?????文件????????357??2009-07-19?11:59??Finance\DateInfo.h
?????文件??????10434??2009-07-31?20:42??Finance\Debug\BuildLog.htm
?????文件??????39174??2009-07-31?20:42??Finance\Debug\DateInfo.obj
?????文件?????322725??2009-07-31?20:42??Finance\Debug\FileManager.obj
?????文件????????936??2009-07-31?20:42??Finance\Debug\Finance.exe.em
?????文件???????1000??2009-07-31?20:42??Finance\Debug\Finance.exe.em
?????文件????????884??2009-07-31?20:42??Finance\Debug\Finance.exe.intermediate.manifest
?????文件??????51837??2009-07-31?20:42??Finance\Debug\Finance.obj
?????文件???13434880??2009-07-31?20:42??Finance\Debug\Finance.pch
?????文件??????24316??2009-07-31?20:42??Finance\Debug\Finance.res
?????文件?????216602??2009-07-31?20:42??Finance\Debug\FinanceDlg.obj
?????文件?????????67??2009-07-31?20:42??Finance\Debug\mt.dep
?????文件?????265598??2009-07-31?20:42??Finance\Debug\stdafx.obj
?????文件?????846848??2009-07-31?20:42??Finance\Debug\vc80.idb
?????文件?????913408??2009-07-31?20:42??Finance\Debug\vc80.pdb
?????目錄??????????0??2009-07-31?20:42??Finance\Debug
?????文件???????3851??2009-07-30?21:40??Finance\FileManager.cpp
?????文件???????1328??2009-07-12?20:35??Finance\FileManager.h
?????文件??????59196??2009-07-19?11:48??Finance\Finance.aps
?????文件???????2097??2009-07-07?21:33??Finance\Finance.cpp
?????文件????????510??2009-07-07?21:33??Finance\Finance.h
?????文件???????6462??2009-07-19?11:48??Finance\Finance.rc
?????文件???????5731??2009-07-31?20:42??Finance\Finance.vcproj
............此處省略19個文件信息
- 上一篇:《精通GDI+編程》.PDF[含目錄]
- 下一篇:面向對象程序設計 旅店管理系統
評論
共有 條評論