return s.str();
}
-// Variable
-Variable::Variable(std::string & n, double v) : name{n}, value{v}
-{}
-
-double Variable::get_value() const
-{
- return value;
-}
-
-std::string Variable::get_postfix() const
-{
- return name;
-}
-
std::string Operand::get_infix() const
{
return get_postfix();
double value;
};
-class Variable : public Operand
-{
-public:
- Variable(std::string & n, double v);
-
- double get_value() const override;
- std::string get_postfix() const override;
-
-protected:
-private:
- std::string name;
- double value;
-};
-
#endif
\ No newline at end of file