binnode4.h

来自「一本全面剖析C++数据结构算法的书籍」· C头文件 代码 · 共 31 行

H
31
字号
#ifndef Node_#define Node_template <class T> class Chain;class Node {   friend ostream& operator<<(ostream&, const Node &);   friend void BinSort(Chain<Node>&, int);   friend int F1(Node&);   friend int F2(Node&);   friend int F3(Node&);   friend void main(void);   public:      operator int() const {return exam1;}   // following should be private. But g++ doesn't like   // main as a friend      int exam1, exam2, exam3;      int name;};ostream& operator<<(ostream& out, const Node& x){   out << x.name << ' ' << x.exam1 << ' ' << x.exam2        << ' ' << x.exam3 << endl;    return out;}#endif

⌨️ 快捷键说明

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