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

📄 pretoin.h

📁 This source code is used for make infix expression from prefix expression by using assembly and C la
💻 H
字号:
#include <stdio.h>  /*For formated input output like fprintf and fscanf*/#include <string.h> /*For formated string like strcpy and strcmp*/#include <stdlib.h> /*For dynamic memory allocation like free and malloc*//*This struct is use for tree node *This struct keep data information and left and right child */typedef struct tree_node* tree_ptr;struct tree_node {		char data; /*1,2,3,4,5,6,7,8,9,0 or + - ,*, / */	tree_ptr leftChildPtr;	tree_ptr rightChildPtr;	}tree_node;/*It start the process of program*/void process(); /*Make a tree node get node data and set left and right child null and return new tree_ptr*/tree_ptr get_node( char data );/*get the evaluation string from stdin and return string lenght*/int getEvaluation( char **evaluation );/*This function is extern that make tree for all char in evaluation*/extern void create_tree( tree_ptr *top , char *evaluation , int evaluationLength );/*Walk on tree inorder traversal and find infix notation put it expressino*/extern void inorder( tree_ptr ptr , char *expression );/*Walk on tree and find the result and return it.Result is float type*/extern float calculate( tree_ptr node ); 

⌨️ 快捷键说明

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