資源簡介
MFC 實現的操作系統的銀行家算法 用于解決資源分配問題,核心算法是回溯法

代碼片段和文件信息
//?BankArthmatic.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“BankArthmatic.h“
#include?“BankArthmaticDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CBankArthmaticApp
BEGIN_MESSAGE_MAP(CBankArthmaticApp?CWinApp)
//{{AFX_MSG_MAP(CBankArthmaticApp)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG
ON_COMMAND(ID_HELP?CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CBankArthmaticApp?construction
CBankArthmaticApp::CBankArthmaticApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CBankArthmaticApp?object
CBankArthmaticApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CBankArthmaticApp?initialization
BOOL?CBankArthmaticApp::InitInstance()
{
AfxEnableControlContainer();
//?Standard?initialization
//?If?you?are?not?using?these?features?and?wish?to?reduce?the?size
//??of?your?final?executable?you?should?remove?from?the?following
//??the?specific?initialization?routines?you?do?not?need.
#ifdef?_AFXDLL
Enable3dControls(); //?Call?this?when?using?MFC?in?a?shared?DLL
#else
Enable3dControlsStatic(); //?Call?this?when?linking?to?MFC?statically
#endif
CBankArthmaticDlg?dlg;
m_pMainWnd?=?&dlg;
int?nResponse?=?dlg.DoModal();
if?(nResponse?==?IDOK)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?OK
}
else?if?(nResponse?==?IDCANCEL)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?Cancel
}
//?Since?the?dialog?has?been?closed?return?FALSE?so?that?we?exit?the
//??application?rather?than?start?the?application‘s?message?pump.
return?FALSE;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2161??2008-04-23?23:55??復件?BankArthmatic\BankArthmatic.cpp
?????文件???????4782??2008-04-28?16:54??復件?BankArthmatic\BankArthmatic.dsp
?????文件????????551??2008-04-23?23:55??復件?BankArthmatic\BankArthmatic.dsw
?????文件???????1401??2008-04-23?23:55??復件?BankArthmatic\BankArthmatic.h
?????文件?????197632??2008-05-07?23:28??復件?BankArthmatic\BankArthmatic.ncb
?????文件??????57856??2008-05-07?23:28??復件?BankArthmatic\BankArthmatic.opt
?????文件???????1112??2008-05-05?18:37??復件?BankArthmatic\BankArthmatic.plg
?????文件???????6485??2008-04-29?22:04??復件?BankArthmatic\BankArthmatic.rc
?????文件??????11916??2008-04-28?17:44??復件?BankArthmatic\BankArthmaticDlg.cpp
?????文件???????1837??2008-04-28?17:18??復件?BankArthmatic\BankArthmaticDlg.h
?????文件?????127063??2008-05-05?18:37??復件?BankArthmatic\Debug\BankArthmatic.exe
?????文件??????13340??2008-04-28?17:18??復件?BankArthmatic\Debug\BankArthmatic.obj
?????文件?????427008??2008-05-05?18:37??復件?BankArthmatic\Debug\BankArthmatic.pdb
?????文件???????3236??2008-05-05?18:37??復件?BankArthmatic\Debug\BankArthmatic.res
?????文件??????45471??2008-04-28?17:44??復件?BankArthmatic\Debug\BankArthmaticDlg.obj
?????文件???????9777??2008-04-28?16:32??復件?BankArthmatic\Debug\LQueue.obj
?????文件???????9640??2008-04-28?16:32??復件?BankArthmatic\Debug\LStack.obj
?????文件??????12374??2008-05-05?18:20??復件?BankArthmatic\Debug\RCa02516
?????文件?????105616??2008-04-28?16:32??復件?BankArthmatic\Debug\StdAfx.obj
?????文件?????364544??2008-04-29?22:03??復件?BankArthmatic\Debug\vc60.pdb
?????文件??????11064??2008-04-28?16:32??復件?BankArthmatic\Debug\work.obj
?????文件??????19343??2008-04-29?22:03??復件?BankArthmatic\Debug\WorkStudio.obj
?????目錄??????????0??2008-08-21?20:27??復件?BankArthmatic\Debug
?????文件???????1538??2008-04-23?23:55??復件?BankArthmatic\LQueue.cpp
?????文件????????654??2008-04-23?23:55??復件?BankArthmatic\LQueue.h
?????文件???????1273??2008-04-23?23:55??復件?BankArthmatic\LStack.cpp
?????文件????????705??2008-04-23?23:55??復件?BankArthmatic\LStack.h
?????文件???????3705??2008-04-23?23:55??復件?BankArthmatic\ReadMe.txt
?????文件???????1078??2008-04-18?23:40??復件?BankArthmatic\res\BankArthmatic.ico
?????文件????????405??2008-04-18?23:40??復件?BankArthmatic\res\BankArthmatic.rc2
............此處省略12個文件信息
評論
共有 條評論