⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 expression.h

📁 用C++编写的一个计算器
💻 H
字号:
/*This program can solve simple formula
 *by adder, subtraction, multiplication and division,
 *whose operand is float, including minus float.
 */
//Expression.h
#if !defined (_EXPRESSION_HEAD_)
#define _EXPRESSION_HEAD_

#if     _MSC_VER > 100
#pragma once
#endif

#include "SqStack.h"

typedef char OptrType;
typedef double OpndType;

class Expression{
	//Epression class
public:
	Expression(char *);
	OpndType calPostExpression(void);
private:
	int In(char c);
	char Precede(OptrType,OptrType);
	OpndType Operate(OpndType x,OptrType o,OpndType y);
	SqStack<OptrType> OPTR; 
	SqStack<OpndType> OPND;
	char* s;
};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -