文件名称:TestCalculatorDemo
介绍说明--下载内容均来自于网络,请自行研究使用
visual c++的mfc编程。简易计算器。可以实现基本功能。
特别说明:1,数字键的都调用PutIntoNum(int n),向当前操作数中追加数字并显示
2,定义了 enum eum_signl 用来存放点击的运算符类型,
点击操作符时调用 RunOperation(enum eum_signl e_signl) 进行运算并显示
3,等号和百分号的实现
定义了 eum_signl en_LastSignl 存放上次的运算符,然后在等号、百分号中调用
RunOperation(enum eum_signl e_signl)进行计算,百分号特别一点只显示成百分数
但不改变实际操作数,
4,其他单目运算符没什么好说的,都是操作当前的操作数-Visual c++ the mfc programming. Simple calculator. You can achieve the basic functions. Special Note: 1, the number keys are calling PutIntoNum (int n), appending a number to the current operation and displays 2 defines the type of enum eum_signl used to store the operator clicks, click the operator call RunOperation (enum eum_signl e_signl ) for computing and 3, defined by the implementation of the equal sign and percent last operator eum_signl en_LastSignl storage, and then called in the equal sign, percent sign RunOperation (enum eum_signl e_signl) is calculated, the percent sign is a little special only displayed as a percentage, but does not change the actual operand, 4, unary nothing to say, are operating current operand
特别说明:1,数字键的都调用PutIntoNum(int n),向当前操作数中追加数字并显示
2,定义了 enum eum_signl 用来存放点击的运算符类型,
点击操作符时调用 RunOperation(enum eum_signl e_signl) 进行运算并显示
3,等号和百分号的实现
定义了 eum_signl en_LastSignl 存放上次的运算符,然后在等号、百分号中调用
RunOperation(enum eum_signl e_signl)进行计算,百分号特别一点只显示成百分数
但不改变实际操作数,
4,其他单目运算符没什么好说的,都是操作当前的操作数-Visual c++ the mfc programming. Simple calculator. You can achieve the basic functions. Special Note: 1, the number keys are calling PutIntoNum (int n), appending a number to the current operation and displays 2 defines the type of enum eum_signl used to store the operator clicks, click the operator call RunOperation (enum eum_signl e_signl ) for computing and 3, defined by the implementation of the equal sign and percent last operator eum_signl en_LastSignl storage, and then called in the equal sign, percent sign RunOperation (enum eum_signl e_signl) is calculated, the percent sign is a little special only displayed as a percentage, but does not change the actual operand, 4, unary nothing to say, are operating current operand
(系统自动生成,下载前可以参看下载内容)
下载文件列表
TestCalculatorDemo
..................\CalculatorDemoDlg.cpp
..................\CalculatorDemoDlg.h
..................\Debug
..................\.....\CalculatorDemoDlg.obj
..................\.....\StdAfx.obj
..................\.....\TestCalculatorDemo.exe
..................\.....\TestCalculatorDemo.ilk
..................\.....\TestCalculatorDemo.obj
..................\.....\TestCalculatorDemo.pch
..................\.....\TestCalculatorDemo.pdb
..................\.....\TestCalculatorDemo.res
..................\.....\TestCalculatorDemoDlg.obj
..................\.....\vc60.idb
..................\.....\vc60.pdb
..................\ReadMe.txt
..................\Resource.h
..................\StdAfx.cpp
..................\StdAfx.h
..................\TestCalculatorDemo.aps
..................\TestCalculatorDemo.clw
..................\TestCalculatorDemo.cpp
..................\TestCalculatorDemo.dsp
..................\TestCalculatorDemo.dsw
..................\TestCalculatorDemo.h
..................\TestCalculatorDemo.ncb
..................\TestCalculatorDemo.opt
..................\TestCalculatorDemo.plg
..................\TestCalculatorDemo.rc
..................\res
..................\...\TestCalculatorDemo.ico
..................\...\TestCalculatorDemo.rc2