<span style="font-family:SimHei;font-size:24px;color:#ff0000;"><em>#include <stdio.h>
#include <iostream>
#include <string>
using namespace std;
#define N 50 //叶子结点数
#define M 2*N-1 //树中结点总数</em></span>
//哈夫曼树的节点结构类型
<span style="font-size:18px;"><strong>typedef struct
{
string data; //结点值
double weight; //权重
int parent; //双亲结点
int lchild; //左孩子结点
int rchild; //右孩子结点
} HTNode;
</strong></span>