⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 infix.cpp

📁 data structures, algorithms and Application书的源代码
💻 CPP
字号:
// generate infix from expression tree

#include <iostream.h>

template <class type>
class BinaryTreeNode {
   friend void Infix(BinaryTreeNode<type>*);
   friend void main(void);
   private:
      type data;
       BinaryTreeNode *LeftChild, *RightChild;
};


#include "infix.h"

void main(void)
{
   BinaryTreeNode<int> x,y,z;
   x.data = 1; y.data = 2; z.data = 3;
   x.LeftChild = &y; x.RightChild = &z;
   y.LeftChild = y.RightChild = z.LeftChild = z.RightChild = 0;
   Infix(&x);
   cout << endl;
}

⌨️ 快捷键说明

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