/*author:windy_2*/ /*修正版*/ #include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct slink { char data; int wp; int bm; int mark; struct slink *left; struct slink *right; }*link; struct hfm { char data; int wp; }; struct T { int data; struct T *next; }; struct te { int data; struct te *next; }; struct slink* create_tree(struct hfm arr[],int len); void print(struct slink *root); int pop(); void push(int k); struct T *T; struct te *te; int pop_s(struct T *strack); void push_t(int k); int pop_t(); int main() { struct slink *root; int i,k=0; char str[20]; char a[20]; int b[20]; int count,j; struct hfm *arr; T = (struct T*)malloc(sizeof(struct T)); T->data = 0; T->next = NULL; te = (struct te*)malloc(sizeof(struct te)); te->data = 0; te->next = NULL; printf("请输入你要进行编码的字符串: "); scanf("%s",str); if(str[strlen(str)] == '