資源簡介
MFC 實現(xiàn) 可加減乘除,括號,乘方 以及進制轉換的 計算器
一、帶括號的四則運算以及乘方運算
二、將M進制轉化為N進制
博客講解地址:http://blog.csdn.net/acmore_xiong/article/details/45417987

代碼片段和文件信息
//?Calculator.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“Calculator.h“
#include?“CalculatorDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CCalculatorApp
BEGIN_MESSAGE_MAP(CCalculatorApp?CWinApp)
//{{AFX_MSG_MAP(CCalculatorApp)
//?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()
/////////////////////////////////////////////////////////////////////////////
//?CCalculatorApp?construction
CCalculatorApp::CCalculatorApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CCalculatorApp?object
CCalculatorApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CCalculatorApp?initialization
BOOL?CCalculatorApp::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
CCalculatorDlg?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;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-07-16?16:34??Calculator\
?????目錄???????????0??2015-04-17?19:28??Calculator\Backup\
?????文件???????37576??2015-04-21?23:25??Calculator\Calculator.aps
?????文件????????2786??2015-05-27?13:00??Calculator\Calculator.clw
?????文件????????2119??2015-04-16?21:12??Calculator\Calculator.cpp
?????文件????????4378??2015-05-27?13:00??Calculator\Calculator.dsp
?????文件?????????528??2015-04-16?21:12??Calculator\Calculator.dsw
?????文件????????1368??2015-04-16?21:12??Calculator\Calculator.h
?????文件???????74752??2015-05-27?13:00??Calculator\Calculator.ncb
?????文件???????51712??2015-05-27?13:00??Calculator\Calculator.opt
?????文件????????1174??2015-05-01?11:21??Calculator\Calculator.plg
?????文件????????7074??2015-04-21?23:25??Calculator\Calculator.rc
?????文件?????????965??2015-04-17?19:29??Calculator\Calculator.sln
?????文件???????19968??2015-04-17?19:32??Calculator\Calculator.v12.suo
?????文件????????7927??2015-04-17?19:32??Calculator\Calculator.vcxproj
?????文件????????1976??2015-04-17?19:29??Calculator\Calculator.vcxproj.filters
?????文件???????11580??2015-05-01?11:20??Calculator\CalculatorDlg.cpp
?????文件????????2332??2015-04-22?00:06??Calculator\CalculatorDlg.h
?????文件????????2037??2015-04-18?17:13??Calculator\ConvertCal.cpp
?????文件????????1239??2015-04-18?16:37??Calculator\ConvertCal.h
?????目錄???????????0??2015-07-16?16:34??Calculator\Debug\
?????文件?????2162788??2015-05-01?11:21??Calculator\Debug\Calculator.exe
?????文件?????2545548??2015-05-01?11:21??Calculator\Debug\Calculator.ilk
?????文件???????13850??2015-04-22?00:07??Calculator\Debug\Calculator.obj
?????文件?????4170752??2015-05-01?11:21??Calculator\Debug\Calculator.pdb
?????文件????????9696??2015-04-21?23:25??Calculator\Debug\Calculator.res
?????文件??????116829??2015-05-01?11:20??Calculator\Debug\CalculatorDlg.obj
?????文件???????17122??2015-04-18?18:36??Calculator\Debug\ConvertCal.obj
?????文件??????105783??2015-04-18?18:36??Calculator\Debug\StdAfx.obj
?????文件??????230400??2015-05-01?11:21??Calculator\Debug\vc60.idb
?????文件??????397312??2015-05-01?11:20??Calculator\Debug\vc60.pdb
............此處省略10個文件信息
評論
共有 條評論