tree

所属分类:数据结构
开发工具:Visual C++
文件大小:57KB
下载次数:31
上传日期:2008-03-30 16:41:37
上 传 者melody7185
说明:  表达式类型的实现: 1、 一个表达式和一颗二叉树之间,存在着自然的对应关系。 2、 假设算术表达式Expression内可以含有变量(a~z)、常量(0~9)和二元运算符(+,-,*,/,^)。实现一下操作。 (1) ReadExpr(E)——以字符序列的形式输入语法正确的前缀表示式并构造表达式E。 (2) WritrExpr(E)——用带括弧的中缀表示式输出表达式E。 (3) Assign(V,c)——实现对变量V的赋值(V=c),变量的初值为0。 (4) Value(E)——对算术表达式E求值。 (5) CompoundExpr(P,E1,E2)——构造一个新的复合表达式(E1)P (E2)。
(Realize the type of expression: one, an expression, and between a binary tree, there is a natural correspondence between. 2, assuming that the arithmetic expression Expression can contain variables (a ~ z), constant (0 ~ 9) and binary operators ( ,-,*,/,^)。 You realize the operation. (1) ReadExpr (E)- sequence of characters in the form of input grammar correct prefix expressions and tectonic expression of E. (2) WritrExpr (E)- used within parentheses express output infix expression E. (3) Assign (V, c)- realize the value V of the variables (V = c), variable initial value is 0. (4) Value (E)- on the arithmetic expression E is evaluated. (5) CompoundExpr (P, E1, E2)- Construction of a new composite expression (E1) P (E2).)

文件列表:
tree\tree.opt (49664, 2006-12-08)
tree\fun.cpp (2462, 2006-12-08)
tree\tree.cpp (1707, 2006-12-08)
tree\treefun.cpp (551, 2006-12-08)
tree\fun.h (417, 2006-12-08)
tree\StdAfx.h (769, 2006-12-07)
tree\StdAfx.cpp (291, 2006-12-07)
tree\tree.dsw (531, 2006-12-07)
tree\tree.ncb (58368, 2006-12-08)
tree\tree.dsp (4694, 2006-12-07)
tree\tree.plg (1302, 2006-12-08)
tree\Debug (0, 2006-12-07)
tree (0, 2006-12-07)
实验报告tree.doc (57344, 2008-03-30)

======================================================================== CONSOLE APPLICATION : tree ======================================================================== AppWizard has created this tree application for you. This file contains a summary of what you will find in each of the files that make up your tree application. tree.dsp This file (the project file) contains information at the project level and is used to build a single project or subproject. Other users can share the project (.dsp) file, but they should export the makefiles locally. tree.cpp This is the main application source file. ///////////////////////////////////////////////////////////////////////////// Other standard files: StdAfx.h, StdAfx.cpp These files are used to build a precompiled header (PCH) file named tree.pch and a precompiled types file named StdAfx.obj. ///////////////////////////////////////////////////////////////////////////// Other notes: AppWizard uses "TODO:" to indicate parts of the source code you should add to or customize. /////////////////////////////////////////////////////////////////////////////

近期下载者

相关文件


收藏者