MFC 实现 可加减乘除,括号,乘方 以及进制转换的 计算器
一、带括号的四则运算以及乘方运算
二、将M进制转化为N进制
博客讲解地址:http://blog.csdn.net/acmore_xiong/article/details/45417987
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-07-16 16:34 Calculator
目录 0 2015-04-17 19:28 CalculatorBackup
文件 37576 2015-04-21 23:25 CalculatorCalculator.aps
文件 2786 2015-05-27 13:00 CalculatorCalculator.clw
文件 2119 2015-04-16 21:12 CalculatorCalculator.cpp
文件 4378 2015-05-27 13:00 CalculatorCalculator.dsp
文件 528 2015-04-16 21:12 CalculatorCalculator.dsw
文件 1368 2015-04-16 21:12 CalculatorCalculator.h
文件 74752 2015-05-27 13:00 CalculatorCalculator.ncb
文件 51712 2015-05-27 13:00 CalculatorCalculator.opt
文件 1174 2015-05-01 11:21 CalculatorCalculator.plg
文件 7074 2015-04-21 23:25 CalculatorCalculator.rc
文件 965 2015-04-17 19:29 CalculatorCalculator.sln
文件 19968 2015-04-17 19:32 CalculatorCalculator.v12.suo
文件 7927 2015-04-17 19:32 CalculatorCalculator.vcxproj
文件 1976 2015-04-17 19:29 CalculatorCalculator.vcxproj.filters
文件 11580 2015-05-01 11:20 CalculatorCalculatorDlg.cpp
文件 2332 2015-04-22 00:06 CalculatorCalculatorDlg.h
文件 2037 2015-04-18 17:13 CalculatorConvertCal.cpp
文件 1239 2015-04-18 16:37 CalculatorConvertCal.h
目录 0 2015-07-16 16:34 CalculatorDebug
文件 2162788 2015-05-01 11:21 CalculatorDebugCalculator.exe
文件 2545548 2015-05-01 11:21 CalculatorDebugCalculator.ilk
文件 13850 2015-04-22 00:07 CalculatorDebugCalculator.obj
文件 4170752 2015-05-01 11:21 CalculatorDebugCalculator.pdb
文件 9696 2015-04-21 23:25 CalculatorDebugCalculator.res
文件 116829 2015-05-01 11:20 CalculatorDebugCalculatorDlg.obj
文件 17122 2015-04-18 18:36 CalculatorDebugConvertCal.obj
文件 105783 2015-04-18 18:36 CalculatorDebugStdAfx.obj
文件 230400 2015-05-01 11:21 CalculatorDebugvc60.idb
文件 397312 2015-05-01 11:20 CalculatorDebugvc60.pdb
............此处省略10个文件信息
// 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 CalculatorBackup
文件 37576 2015-04-21 23:25 CalculatorCalculator.aps
文件 2786 2015-05-27 13:00 CalculatorCalculator.clw
文件 2119 2015-04-16 21:12 CalculatorCalculator.cpp
文件 4378 2015-05-27 13:00 CalculatorCalculator.dsp
文件 528 2015-04-16 21:12 CalculatorCalculator.dsw
文件 1368 2015-04-16 21:12 CalculatorCalculator.h
文件 74752 2015-05-27 13:00 CalculatorCalculator.ncb
文件 51712 2015-05-27 13:00 CalculatorCalculator.opt
文件 1174 2015-05-01 11:21 CalculatorCalculator.plg
文件 7074 2015-04-21 23:25 CalculatorCalculator.rc
文件 965 2015-04-17 19:29 CalculatorCalculator.sln
文件 19968 2015-04-17 19:32 CalculatorCalculator.v12.suo
文件 7927 2015-04-17 19:32 CalculatorCalculator.vcxproj
文件 1976 2015-04-17 19:29 CalculatorCalculator.vcxproj.filters
文件 11580 2015-05-01 11:20 CalculatorCalculatorDlg.cpp
文件 2332 2015-04-22 00:06 CalculatorCalculatorDlg.h
文件 2037 2015-04-18 17:13 CalculatorConvertCal.cpp
文件 1239 2015-04-18 16:37 CalculatorConvertCal.h
目录 0 2015-07-16 16:34 CalculatorDebug
文件 2162788 2015-05-01 11:21 CalculatorDebugCalculator.exe
文件 2545548 2015-05-01 11:21 CalculatorDebugCalculator.ilk
文件 13850 2015-04-22 00:07 CalculatorDebugCalculator.obj
文件 4170752 2015-05-01 11:21 CalculatorDebugCalculator.pdb
文件 9696 2015-04-21 23:25 CalculatorDebugCalculator.res
文件 116829 2015-05-01 11:20 CalculatorDebugCalculatorDlg.obj
文件 17122 2015-04-18 18:36 CalculatorDebugConvertCal.obj
文件 105783 2015-04-18 18:36 CalculatorDebugStdAfx.obj
文件 230400 2015-05-01 11:21 CalculatorDebugvc60.idb
文件 397312 2015-05-01 11:20 CalculatorDebugvc60.pdb
............此处省略10个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)