?? pretoin.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 + -