資源簡介
實驗一:doolittle求多項式的解 grauss 求多項式的解
實驗二:Lagrange插值求解函數值 Newton插值求解函數值
實驗三:變步長梯形法 Romberg算法
實驗四:改進歐拉法 四階龍格-庫塔法
共8個算法,在一個mfc項目中完成的。然后是c代碼。自己的簡單作業。

代碼片段和文件信息
//?MainFrm.cpp?:?implementation?of?the?CMainframe?class
//
#include?“stdafx.h“
#include?“Test_math.h“
#include?“MainFrm.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CMainframe
IMPLEMENT_DYNCREATE(CMainframe?CframeWnd)
BEGIN_MESSAGE_MAP(CMainframe?CframeWnd)
//{{AFX_MSG_MAP(CMainframe)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code?!
ON_WM_CREATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
static?UINT?indicators[]?=
{
ID_SEPARATOR???????????//?status?line?indicator
ID_INDICATOR_CAPS
ID_INDICATOR_NUM
ID_INDICATOR_SCRL
};
/////////////////////////////////////////////////////////////////////////////
//?CMainframe?construction/destruction
CMainframe::CMainframe()
{
//?TODO:?add?member?initialization?code?here
}
CMainframe::~CMainframe()
{
}
int?CMainframe::OnCreate(LPCREATESTRUCT?lpCreateStruct)
{
if?(CframeWnd::OnCreate(lpCreateStruct)?==?-1)
return?-1;
if?(!m_wndToolBar.CreateEx(this?TBstyle_FLAT?WS_CHILD?|?WS_VISIBLE?|?CBRS_TOP
|?CBRS_GRIPPER?|?CBRS_TOOLTIPS?|?CBRS_FLYBY?|?CBRS_SIZE_DYNAMIC)?||
!m_wndToolBar.LoadToolBar(IDR_MAINframe))
{
TRACE0(“Failed?to?create?toolbar\n“);
return?-1;??????//?fail?to?create
}
if?(!m_wndStatusBar.Create(this)?||
!m_wndStatusBar.SetIndicators(indicators
??sizeof(indicators)/sizeof(UINT)))
{
TRACE0(“Failed?to?create?status?bar\n“);
return?-1;??????//?fail?to?create
}
//?TODO:?Delete?these?three?lines?if?you?don‘t?want?the?toolbar?to
//??be?dockable
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);
return?0;
}
BOOL?CMainframe::PreCreateWindow(CREATESTRUCT&?cs)
{
if(?!CframeWnd::PreCreateWindow(cs)?)
return?FALSE;
//?TODO:?Modify?the?Window?class?or?styles?here?by?modifying
//??the?CREATESTRUCT?cs
return?TRUE;
}
/////////////////////////////////////////////////////////////////////////////
//?CMainframe?diagnostics
#ifdef?_DEBUG
void?CMainframe::AssertValid()?const
{
CframeWnd::AssertValid();
}
void?CMainframe::Dump(CDumpContext&?dc)?const
{
CframeWnd::Dump(dc);
}
#endif?//_DEBUG
/////////////////////////////////////////////////////////////////////////////
//?CMainframe?message?handlers
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-09-12?19:18??c代碼\
?????文件????????3885??2016-05-24?22:13??c代碼\實驗一.txt
?????文件????????2823??2016-05-23?23:05??c代碼\實驗三.txt
?????文件????????1855??2016-05-24?20:14??c代碼\實驗二.txt
?????文件????????2242??2016-05-17?18:58??c代碼\實驗四.txt
?????文件????????2289??2016-09-12?19:31??關于mfc及打開.txt
?????目錄???????????0??2016-09-12?19:30??界面\
?????目錄???????????0??2016-09-12?19:30??界面\Debug\
?????文件???????19735??2016-05-23?12:32??界面\Debug\MainFrm.obj
?????文件??????105462??2016-05-23?12:32??界面\Debug\StdAfx.obj
?????文件???????13784??2016-05-24?22:10??界面\Debug\Test1.obj
?????文件???????14322??2016-09-12?19:30??界面\Debug\Test1_1.obj
?????文件???????15393??2016-05-24?22:10??界面\Debug\Test1_2.obj
?????文件???????13784??2016-05-24?19:46??界面\Debug\Test2.obj
?????文件???????13174??2016-05-24?19:58??界面\Debug\Test2_1.obj
?????文件????????1976??2016-05-23?23:57??界面\Debug\Test2_1_input.obj
?????文件???????13450??2016-05-24?20:11??界面\Debug\Test2_2.obj
?????文件???????13772??2016-05-23?22:53??界面\Debug\Test3.obj
?????文件???????13513??2016-05-28?17:21??界面\Debug\Test3_1.obj
?????文件???????14418??2016-05-23?22:54??界面\Debug\Test3_2.obj
?????文件???????13760??2016-05-23?18:49??界面\Debug\Test4.obj
?????文件???????13357??2016-05-23?22:22??界面\Debug\Test4_1.obj
?????文件???????15696??2016-05-28?15:46??界面\Debug\Test4_2.obj
?????文件??????151621??2016-09-12?19:30??界面\Debug\Test_math.exe
?????文件??????358932??2016-09-12?19:30??界面\Debug\Test_math.ilk
?????文件???????22942??2016-05-23?12:47??界面\Debug\Test_math.obj
?????文件?????5499184??2016-05-23?12:32??界面\Debug\Test_math.pch
?????文件??????525312??2016-09-12?19:30??界面\Debug\Test_math.pdb
?????文件???????12508??2016-06-05?20:36??界面\Debug\Test_math.res
?????文件???????14703??2016-05-23?12:32??界面\Debug\Test_mathDoc.obj
?????文件???????27647??2016-05-23?12:54??界面\Debug\Test_mathView.obj
............此處省略53個文件信息
- 上一篇:Windows程序設計小游戲捕魚達人
- 下一篇:通用殺毒軟件VC++源代碼
評論
共有 條評論