📄 calculator.h
字号:
// Calculator.h: interface for the CCalculator class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_CALCULATOR_H__FEC39822_B7E7_11D9_BEDA_000AEB106808__INCLUDED_)
#define AFX_CALCULATOR_H__FEC39822_B7E7_11D9_BEDA_000AEB106808__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define N 5
class CCalculator
{
public:
int compareR(char c1,char c2);
double compute(double a,char op,double b);
int compareL(char c1,char c2);
CCalculator();
enum {OK=0,NOOPERATOR};
virtual ~CCalculator();
int m_nStatus;
protected:
double add(double a,double b);
double sub(double a,double b);
double product(double a,double b);
double divide(double a,double b);
static char m_nPriorityL[N][N];
static char m_nPriorityR[N][N];
static char m_cOperatorTable[N];
double (CCalculator::*m_pfOperation[N])(double,double);
};
#endif // !defined(AFX_CALCULATOR_H__FEC39822_B7E7_11D9_BEDA_000AEB106808__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -