real.cpp
来自「一个在linux下的shell的计算器」· C++ 代码 · 共 79 行
CPP
79 行
/* * * * */#include <sstream>#include "real.h"using namespace std;//////Real::Real(double x): Item(){ type = REAL; value = x;}//////Real::~Real(){}//////double Real::GetValue() const{ return value;}//////void Real::SetValue(double x){ value = x;}//////Item *Real::Clone(){ return new Real(value);}//////double Real::ToDouble() const { return value;}//////string Real::ToString() const { stringstream str; str << value; return str.str();}//////ostream & operator<<(ostream & stream, Real const & x){ cerr << "Debug!!" << endl; return (stream << x.GetValue());}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?