booster.h

来自「function to compute an expression using 」· C头文件 代码 · 共 24 行

H
24
字号

#ifndef booster_
#define booster_

#include <iostream>

using namespace std;

struct booster
{
   int degradeToLeaf,           // degradation to leaf
       degradeFromParent;       // degradation from parent
   bool boosterHere;            // true iff booster here

   void output(ostream& out) const
   {out << boosterHere << ' ' << degradeToLeaf << ' '
        << degradeFromParent << ' ';}
};

// overload <<
ostream& operator<<(ostream& out, booster x)
   {x.output(out); return out;}
#endif

⌨️ 快捷键说明

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