📄 operand.h
字号:
#ifndef __OPERAND_H__
#define __OPERAND_H__
#include "tdafx.h"
struct Operand
{
/* virtual void Mul(const Operand&){}
virtual void Div(const Operand&){}
virtual void Add(const Operand&){}
virtual void Sub(const Operand&){}
*/
virtual double GetResult()const{return 1;}
virtual double GetSingleValue()const=0;
virtual bool operator<(const Operand&)const{return false;}
virtual bool IsConst()const{return false;}
virtual string GetExpression()const{return "";};
//virtual void FillNode(double){}
virtual ~Operand(){};//不能为纯虚
protected:
Operand(){}//不能为私有??
};
#endif //__OPERAND_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -